Name
DateConvert — New as of ColdFusion 4.01
Synopsis
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>
Get Programming ColdFusion now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.