Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
MVP & Luminary
MVP & Luminary

Re: Converting from SGT to UTC Timestamp

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
Highlighted
MVP
MVP

Re: Converting from SGT to UCT Timestamp

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

Highlighted
Champion III
Champion III

Re: Converting from SGT to UCT Timestamp

Highlighted
Creator
Creator

Re: Converting from SGT to UCT Timestamp

I tried to implement as shown above,.

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

Highlighted

Re: Converting from SGT to UCT Timestamp

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')

Highlighted
Creator
Creator

Re: Converting from SGT to UCT Timestamp

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

Highlighted

Re: Converting from SGT to UTC Timestamp

Try this expression

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

this should work

Highlighted
MVP & Luminary
MVP & Luminary

Re: Converting from SGT to UTC Timestamp

Hi,

Try like this

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

Regards,

Jagan.

View solution in original post

Highlighted
Master
Master

Re: Converting from SGT to UTC Timestamp

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!”
Highlighted

Re: Converting from SGT to UTC Timestamp

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

];