Skip to Content
0
Nov 22, 2013 at 12:59 PM

Convert Time and date in User time zone to UTC

6420 Views

Hi team,

I need to convert the date and time entered in user time zone to UTC. I have written the following code.

CONVERT DATE im_date_range-low TIME l_time_from INTO TIME STAMP l_utc_low_tstmp TIME ZONE l_timezone_utc

For Example my time zone is PST, and I want to convert into UTC. but the above statement is just concatenating the Date and Time.but not converting into time stamp in UTC.

I entered the date and time as follows

Date : 11/22/2013 and Time 00:00:00

I expect a time stamp in UTC as following

20131122070000 , i..e. the time which is 7 hrs ahead. but the output is 20131122000000 which is just concatenating the Date and time.

Can any one let me know the settings to be made.

My user is configured with PST time zone and I want to convert the date and time into UTC.