cancel
Showing results for 
Search instead for 
Did you mean: 

Conversion of time stamp from any time zone to UTC

Former Member
0 Kudos

Hi, I need to convert a timestamp of any selected timezone, to UTC.

I find that CONVERT TIME STAMP <timestamp> into DATE <date> TIME <time> TIME ZONE <tz> converts from system time to <tz>. But in my application, the user selects the time zone from a drop down, and this needs to be converted into UTC.

Please help!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Shalini,

Try this statement:

CONVERT DATE dat [TIME tim [DAYLIGHT SAVING TIME dst]]

INTO TIME STAMP time_stamp TIME ZONE tz.

This statement adopts a date specified in dat, a time specified in tim, and a daylight saving time selection specified in dst as the local date and time specification for the time zone specified in tz, converts it to the UTC reference time, and assigns the result to the time_stamp variable as a time stamp.

Hope this helps.

Regards,

Wenonah

Answers (0)