Alteryx Designer Desktop Discussions

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

Time Zone conversion

ArnabSengupta
8 - Asteroid

Hi All,

 

I have a dataset in which the time stamp is in UTC. I want to convert it into CDT/CST (including the daylight saving time switches). I cannot use [DateTimetoLocal] function because our Alteryx server runs on GMT. If I use this function the the time stamp will get converted into GMT instead on CDT/CST.

 

How can I convert this time stamp in CDT/CST time, with taking into consideration of daylight saving?

 

I have attached a sample dataset to the question.

 

Help is much appreciated.

 

Thank you!

13 REPLIES 13
ImadZidan
12 - Quasar

Hello @ArnabSengupta ,

 

Just an idea.

 

I have switched the date to UTC and took out 5 hours which returns the CDT.

 

Just an idea. 

 

Hope it helps.

 

 

ArnabSengupta
8 - Asteroid

The time is given in UTC. Yes that can be done through [DateTimeAdd] function but when the time changes later due to daylight saving then I have to go back in again and change the formula. I am trying to avoid this.

ImadZidan
12 - Quasar

@ArnabSengupta ,

 

I agree, will it sufficient to put a check on the date. If it is within specific dates to change the number of hours to deduct.

 

We can figure out the dates when the clock  changes, I think.

 

 

ArnabSengupta
8 - Asteroid

Yeah I am trying to avoid that because the data will be available on real time view.

ImadZidan
12 - Quasar

@ArnabSengupta ,

 

One thing I am not sure of,  taking out 5 hours off the UTC will always be the case. Even when the time changes. So I am not sure you will need to make any change when clock switches. The switch is universal.

 

What I am saying it will always be -5. CDT is always UTC -5.

 

What am I missing? Or am i wrong in this conclusion?

 

ArnabSengupta
8 - Asteroid

Hi,

 

I guess I should have been more clear, during mid March - mid November it should be CDT(UTC-5), offset DST and during mid November- mid March it should be CST (UTC-6).

atulsood
5 - Atom

Did you get any solution for this? I am also looking for something similar too

ArnabSengupta
8 - Asteroid

@atulsood : Hi, there is no solution to it but needs a manual intervention. I downloaded the calendar for time shifts of next 15 years and used date time field to offset the time

JonBCOKE
6 - Meteoroid

Unfortunately daylight savings changes on a Saturday night near the intended date. Also, this can be changed by the government to different dates. So hard coding is not desired.

 

Based on another post, I got the thought to use DateTimetoUTC and other DateTime functions as follows:

DateTimeDiff(DateTimeToUTC(DateTimeToday()),DateTimeToday(),"hour")

 

This gives me the hours my system is currently off from UTC by comparing my current local time (DateTimeToday) to the UTC equivalent current time. This simply relies on my computer to  be current with daylight savings changes.

Labels