Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I need to convert two types of Eastern time - with and without DST adjustment - to GMT.
I'm using ConvertToLocalTime function with opposite offset to achieve it. It works fine without DST
ConvertToLocalTime([Time Local], 'GMT+05:00',-1)
However, when I change last parameter to 0, It doesn't change anything.
ConvertToLocalTime([Time Local], 'GMT+05:00',0)
The interesting thing is, if I try to use 'GMT-', e.g. like this
ConvertToLocalTime([Time Local], 'GMT-05:00',0)
DST adjustment works fine, however it is not the timezone I need.
Any ideas how to achieve it?
Thanks
ConvertToLocalTime() Converts a UTC or GMT timestamp to local time as a dual value [pasted from the Help]
Whereas what you are trying to do is the opposite, as in converting a local time to GMT.
Also GMT [aka UTC] does not have daylight saving. Always best to use a major city for the time zone, e.g. 'New York' as cities do have daylight saving. Also different cities also change to DST on different days of the year. Fiji for reasons best know to them a few years back decided to change their DST in November and mid January which seemed to catch most people out.
Qlik for some reason best know to them does not have a ConvertFromLocalTime() function which makes what you are trying to do less than easy.
Have a look at this thread, How to convert from local time? - it may give you some inspiration.
i think you can use
ConvertToLocalTime([Time Local], 'GMT+05:00') and
ConvertToLocalTime([Time Local], 'GMT+04:00')
ConvertToLocalTime() Converts a UTC or GMT timestamp to local time as a dual value [pasted from the Help]
Whereas what you are trying to do is the opposite, as in converting a local time to GMT.
Also GMT [aka UTC] does not have daylight saving. Always best to use a major city for the time zone, e.g. 'New York' as cities do have daylight saving. Also different cities also change to DST on different days of the year. Fiji for reasons best know to them a few years back decided to change their DST in November and mid January which seemed to catch most people out.
Qlik for some reason best know to them does not have a ConvertFromLocalTime() function which makes what you are trying to do less than easy.
Have a look at this thread, How to convert from local time? - it may give you some inspiration.
Thank you Bill, Ralf's solution from that old thread helps me