Do you ever forget the syntax for the DateFormat and TimeFormat functions? I do, especially for TimeFormat. Well ColdFusion has built-in mask shortcuts: short, medium, long and full. View examples below...
<cfoutput>
#DateFormat(Now(), "short")# #TimeFormat(Now(), "short")#
#DateFormat(Now(), "medium")# #TimeFormat(Now(), "medium")#
#DateFormat(Now(), "long")# #TimeFormat(Now(), "long")#
#DateFormat(Now(), "full")# #TimeFormat(Now(), "full")#
</cfoutout>
Displays this:
short: 8/23/05 1:13 PM
medium: Aug 23, 2005 1:13:30 PM
long: August 23, 2005 1:13:30 PM PDT
full: Tuesday, August 23, 2005 1:13:30 PM PDT
Recent Comments