Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to convert the DateTime 02/07/2015 04:59:32 (Field Name as LoginTime) which is in EST to be converted to GMT as well as I need to convert to Philippine Time zone based on a condition
In database I have columns
LoginTime | TimeZone |
---|---|
02/07/2015 04:59:32 | 2 |
02/07/2015 07:50:01 | 3 |
Time Zone 1 = EST Time Zone
2 = GMT (London)
3 = Philippine Time Zone
But LoginTime time is always in EST based on timezone I have to convert it to localtime based on timezone condition
Thanks in advance.
You could try it with the function converttolocaltime() but if you have only a few timezone offsets then you could simply add the hour-offset to your LoginTime, like:
LoginTime + (1/24 * pick(match(TimeZone, 2, 3), 5, -7))
The bolded offset-hours are only dummy-values for this example, you have to look for the correct ones maybe here:
http://www.worldtimebuddy.com/est-to-gmt-converter
- Marcus
How to handle daylight saving when value is hard coded