I have the number of minutes (ie. 25, 120, 300, etc) entered by the user, and I need to display it in a h:mm:ss format. Are there any built-in ColdFusion functions that can do this for me, or does anyone have any suggestions about the easiest way to build out the string?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
<cfset totaltime = "#totalminutes\60#:#numberformat(totalminutes % 60, "00")#:00" />
回答2:
Kinda late to the game, but this works pretty nicely:
TimeFormat(CreateTimeSpan(0,0,minutes,0))