I am pulling dates in through an API and it is coming through formatted as above. After looking online I believe the "Z" is stating the date is in UTC and the T is simply a barrier between the date and time. Now what would be the best way to convert this to a date time string in EST?
I tried the simple "DateTime" icon converter but I believe the T and Z are confusing it.
I tried creating my own Regex to convert this to a string and then thought I'd use the DateTimeToLocal() command to get to the datetime I want. Below is my Regex. Would it be easier to just remove the T and Z, convert to datetime and then datetime local?
(\d{2}-\d{2}-\d{4}T\d{2}:\d{2}:\d{2}.\d{3})
Solved! Go to Solution.
Using the DateTime tool in Custom mode with the following in the formula should do the trick;
yyyy-mm-ddThh:mm:ss
You'll still need to convert to local, but to get it in DateTime type, this should work.
Cheers!
Zak
Thank you, that was so much simpler than what I was trying to do!
You can also use this formula to remove T & Z:
Replace(Replace(YOUR_DATE_TIME, 'T', ' '), 'Z', '')
Select the data type of the output as datetime & convert to your preferred timezone
Karam
hi @ISUGraber
Once you have the UTC datetime in Alteryx format, you can use the DateTimeToLocal() function, in a formula tool of course, to convert it to your local time zone.
Dan