TimeFormat (time [, mask]) Description Formats a time value. If no mask is used, it returns the time in the form of hh:mm tt. Use the following values for the mask: h. Hours, no leading zero for single-digit hours (12-hour clock) hh. Hours, leading zero for single-digit hours (12-hour clock) H. Hours, no leading zero for single-digit hours (24-hour clock) HH. Hours, leading zero for single-digit hours (24-hour clock) m. Minutes, no leading zero for single-digit minutes mm. Minutes, a leading zero for single-digit minutes s. Seconds, no leading zero for single-digit seconds ss. Seconds, leading zero for single-digit seconds t. One-character time marker string, such as A or P tt. Multiple-character time marker string, such as AM or PM Example <cfset exampleDate = now()> <cfoutput> #TimeFormat(exampleDate)# #TimeFormat(exampleDate, "hh:mm:ss")# #TimeFormat(exampleDate, "hh:mm:sst")# #TimeFormat(exampleDate, "hh:mm:sstt")# #TimeFormat(exampleDate, "HH:mm:ss")# </cfoutput> |