Reputation: 4065
I have this string: "{ts '2015-03-02 12:00:00'}"(variables.fl_dt) and I am trying to convert it using date format:
#DateFormat("#variables.fl_dt#", "yyyy.MM.dd 'at' HH:nn:ss")#
Everything is ok except the minutes: 2015.03.02 at 12:nn:00 On Adobe's website "nn" is for minutes but it seems that is not working here. Any ideas?
Upvotes: 1
Views: 297
Reputation: 63
Look at Adam's comment. dateTimeFormat() will give you what you need.
#DateTimeFormat(variables.fl_dt, "yyyy.MM.dd 'at' HH:nn:ss")#
displays 2015.03.02 at 06:03:10
Upvotes: 2
Reputation:
DateFormat does not have time pattern. Requested result can be obtained using DateFormat and TimeFormat functions.
<cfset result = DateFormat(variables.fl_dt, "yyyy.MM.dd") & " at " &
TimeFormat(variables.fl_dt, "HH:nn:ss") />
Upvotes: 4