August 2001
Intermediate to advanced
976 pages
38h 8m
English
DateConvert — New as of ColdFusion 4.01
DateConvert(type, date)Converts date to Universal Coordinated
Time (UTC) or UTC to local time based on
type (local2UTC or
UTC2Local). The following example converts local
time to UTC time:
<CFSET TheTimeDate = Now( )>
<CFSET UCT = DateConvert('local2UTC', TheTimeDate)>
<CFOUTPUT>
<B>Current time/date:</B> #TimeFormat(TheTimeDate,'hh:mm:ss tt')#, #DateFormat(TheTimeDate,'mmmm dd, yyyy')#
<P><B>UCT:</B> #UCT#
</CFOUTPUT>Read now
Unlock full access