Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

How do you convert UTC to local time?

jthompson789
8 - Asteroid

I've been told the sql server I'm using uses UTC for its data time fields. The adjustment is -7 hours to show local time in the data base.

Is there an Aleryx tool that can help me with this conversion or how would I write the sql code to adjust for the 7 hour difference?

Any help will be greatly appreciated.

 

4 REPLIES 4
tcroberts
12 - Quasar

You could add a Formula tool with the following expression:

 

DateTimeAdd([DateTime], -7, 'hours')

 

Let me know if you have any questions, or this isn't quite what you were looking for

jthompson789
8 - Asteroid

Your suggestion started me looking at the date time functions and I found one built to convert UTC code.

 

Here it is: DateTimeToLocal([datetime])

 

I put this into a formula tool and it worked perfectly for my time zone.

 

Thanks for all the help.

 

 

tcroberts
12 - Quasar

Perfect! I'm glad I could point you in the right direction, and actually learn something myself

 

Cheers!

itahir04
8 - Asteroid

Great guys - this function also helped me convert my UTC time to eastern time. I exactly needed to subtract 7 hours to this function is working great.

 

Thanks,

Rana

Labels