Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
lakshmanvepuri
Creator
Creator

Converting from SGT to UTC Timestamp

Hi,

Please let me know how can we convert SGT Timwstamp to UTC TimeStamp..

Eg:  2/27/2016 7:00:00 PM

Thanks

Lakshmana

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

=Timestamp(WIP_TIMESTAMP- 8/24, 'MM/DD/YYYY hh:mm:ss TT')

Regards,

Jagan.

View solution in original post

10 Replies
maxgro
MVP
MVP

ConvertToLocalTime( timestamp#('2/27/2016 7:00:00 PM', 'M/D/YYYY h:mm:ss tt') , 'UTC-8.00' )

lakshmanvepuri
Creator
Creator
Author

I tried to implement as shown above,.

I am not getting any result... .. Its blank

avinashelite

try like this

Time(yourtimetime - time#(8,'h'), 'hh:mm:ss')


or


=Timestamp('3/12/2014 12:11:53 PM' - 0.33333, 'hh:mm:ss')

lakshmanvepuri
Creator
Creator
Author

Hi Avinash,

I didn't the data as expected. Please find the code and the output.

left Keep(KL)

LOAD

ConvertToLocalTime(WIP_TIMESTAMP, 'UTC') AS UTC_Time,

ConvertToLocalTime(WIP_TIMESTAMP, 'UTC-8.00') AS UTC_Time1,

ConvertToLocalTime( Timestamp#(WIP_TIMESTAMP), 'UTC-8.00') AS UTC_Time2,

Time#(WIP_TIMESTAMP - Time#(8,'h'), 'hh:mm:ss') AS UTC_Time3,

Time(WIP_TIMESTAMP - Time#(8,'h'), 'hh:mm:ss') AS UTC_Time4,

Timestamp(WIP_TIMESTAMP - 0.33333, 'hh:mm:ss') AS UTC_Time5

Resident KL;

screenshot.748.jpg

I want the Output as : 03/09/2016 02:00:00 AM

Thanks a lot

avinashelite

Try this expression

Timestamp(WIP_TIMESTAMP- 0.33333, 'DD/MM/YYYY hh:mm:ss TT')

this should work

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

=Timestamp(WIP_TIMESTAMP- 8/24, 'MM/DD/YYYY hh:mm:ss TT')

Regards,

Jagan.

HirisH_V7
Master
Master

Hi,

Check this,

Data:

LOAD * ,

ConvertToLocalTime(Timestamp#(Time,'M/D/YYYY h:mm:ss tt'),'Singapore') as UTC1,

ConvertToLocalTime(Timestamp#(Time,'M/D/YYYY h:mm:ss tt'),'UTC+08:00') as UTC

INLINE [

    Time

    2/27/2016 7:00:00 PM

];

Both will give the same output,

UTC Time-207297.PNG

Hope this helps,

PFA,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
MayilVahanan

HI

Try like this

LOAD *, (Timestamp(Timestamp#(T ,'DD/MM/YYYY hh:mm:ss tt')-8/24, 'DD/MM/YYYY hh:mm:ss TT')) as T1, Timestamp(ConvertToLocalTime(Timestamp#(T,'D/M/YYYY h:mm:ss tt'),'UTC-08:00'),'DD/MM/YYYY hh:mm:ss TT') as T2 inline

[

T

03/09/2016 10:00:00 AM

];

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.