User Guide

TimeFormat 719
TimeFormat
Description
Formats a time value using US English time formatting conventions.
Returns
A custom-formatted time value. If no mask is specified, returns a time value using the hh:mm tt
format. For international time formatting, see LSTimeFormat.
Category
Date and time functions, Display and formatting functions
Function syntax
TimeFormat(time [, mask ])
See also
CreateTime, Now, ParseDateTime, LSTimeFormat, DateFormat
History
ColdFusion MX 6.1: Added the mask character L or l to represent milliseconds.
ColdFusion MX:
Changed the way extra characters are processed: this function processes extra characters within
the
mask value differently than in earlier releases, as follows:
ColdFusion 5 and earlier: the function returns the time format and an apostrophe-delimited
list of the extra characters. For example,
TimeFormat(Now(), "hh:mm:ss dog") returns
8:17:23 d'o'g.
ColdFusion MX: the function returns the time format and the extra characters. For
example, for the call above, it returns
8:17:23 dog.
If the extra characters are single-quoted (for example,
hh:mm:ss 'dog'), ColdFusion 5 and
ColdFusion MX return the time format and the extra characters:
8:17:23 dog.
Added support for the following mask attribute options: short, medium, long, and full.