Changing ToUTC function output to standard date/time format

01-06-2022 08:38 AM
Labels (1)
New Contributor II


I'm using the ToUTC() function on a date field that fixes my date field, however, it returns the date in the format of  "Mon Jan 03 2022 06:22:24 GMT-0600 (Central Standard Time)". This presents a lot of excess information, and I was wondering if there's a way to change the format so that it is in the format of 1/3/22 06:22:24.

Thanks in advance.

Tags (2)
0 Kudos
2 Replies
Occasional Contributor III

try this: 

var callMonth = Text(ToUTC($feature.CallDateTime),'MM/DD/YY HH:MM:SS')
return callMonth
0 Kudos
New Contributor II

I substituted in the global from the map, it returns a blank string.

var callMonth = Text(ToUTC($datapoint["USER_DateTime"]),'MM/DD/YY HH:MM:SS')


0 Kudos