Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有用户输入的分钟数(即 25、120、300 等),我需要以 ah:mm:ss 格式显示。是否有任何内置的 ColdFusion 函数可以为我做到这一点,或者是否有人对构建字符串的最简单方法有任何建议?
<cfset totaltime = "#totalminutes\60#:#numberformat(totalminutes % 60, "00")#:00" />
游戏有点晚了,但这很好用:
TimeFormat(CreateTimeSpan(0,0,minutes,0))