Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Convert UTC to Local Time by Location

Mychele
7 - Meteor

I've checked multiple posts in the community, but can't quite figure out how to do what I need.  I have orders from multiple locations, across multiple time zones, and some of the locations don't participate in Daylight Saving Time.  Yet, somehow, I need to convert the order time from UTC to local time.  Parsing out the hour from the timestamp portion is easy, I just don't know to build in all the other logic and have it work during DST and without DST.  

 

Order #LocationOrder DateOrder Time (UTC)Time ZoneDaylight SavingUTC to LocalConvert to DSTExpected Result
1017/15/20202020-07-15T15:00:00CentralYUTC minus 6N/A in July9
1127/15/20202020-07-15T19:00:00CentralNUTC minus 6N/A - No DST at this location13
1237/15/20202020-07-15T20:00:00EasternYUTC minus 5N/A in July15
90112/15/20202020-12-15T15:00:00CentralYUTC minus 6UTC minus 510
91212/15/20202020-12-15T19:00:00CentralNUTC minus 6N/A - No DST at this location13
92312/15/20202020-12-15T20:00:00EasternYUTC minus 5UTC minus 416

 

This site has a small table of Daylight Saving Time for the next few years, which might help when evaluating an order date to see if it's in DST or not.  While a dynamic solution is ideal, I'm not opposed to hard coding this table as a Text Input, since I hope my project doesn't need to exist more than a few years.

https://www.timeanddate.com/time/change/@5366730

 

Sample data is attached.  

Thanks so much for reading and please tell your dog I said hi!

--Mychele

3 REPLIES 3
cmcclellan
13 - Pulsar

I didn't include the DST calculation, but this is what I did : 

 

2020-07-16 09_52_36-Alteryx Designer x64 - New Workflow1_.png

Mychele
7 - Meteor

This is great!  Thanks!

Mychele
7 - Meteor

For reference, here's the final solution.

 

Mychele_0-1595275257156.png

 

Labels