ISO 8601 datetime String format in coldfusion
Convert datetime format into iso datetime format using coldfusion dateconvert, dateformat and timeformat
<cfset date = now() />
<cfset datetime = dateConvert( "local2utc", date )>
<cfoutput>
#dateFormat( datetime, "yyyy-mm-dd" ) & "T"
& timeFormat( datetime, "HH:mm:ss" ) & "Z"#
</cfoutput>
Output:
2015-06-09T14:22:59Z
Comments
Post a Comment