Forum Discussion
emteka
Advocate I
10 years agoTime format [h:mm tt]
I have a text field which contains value in the form of: 10:30:00 14:00:00 When I tell that this field contains time value and apply the time format [h:mm tt] the result is 10:30 tt 14:...
cityofglass88
9 years agoFrequent Visitor
Came across this thread while searching for a solution from a measure using FORMAT() and "tt" returing a 24 hour result, instead of a 12 hour result.
Im my situation, query pulls in date/time as a 12 hour format. When using a measure to return a date value, I can correctly format it to "m/dd/yy h:mm tt". I was using this to create a text value; this is where the formatting broke.
Original Formula = "Last Refresh: " & FORMAT( [DateTime] , "m/dd/yy h:mm tt")
Result = Last Refresh: 2/22/17 13:18
Correct Formula = "Last Refresh: " & FORMAT( [DateTime] , "m/dd/yy h:mm AM/PM")
Result = Last Refresh 2/2/17 1:18 PM
Sent a frown for the documented "tt" formatting not working, but using AM/PM, am/pm, A/P, a/p works without issue.