Forum Discussion

619SK's avatar
619SK
Helper II
1 year ago
Solved

Timezone Conveter

I want to convert Date & Time into CST, GMT, SGT, EST, IST  timezone.

I have date columns and also created Refresh date time which should change by clikcing on Timezone.

 

 

  • You can use DateTimeZone.SwitchZone function, for example

    DateTime.LocalNow() leads to curent date and time at your location but the next fromula convert it to GMT (UTC+0)

    DateTimeZone.SwitchZone(DateTimeZone.LocalNow(), 0)

     


    Example for CST (UTC-6):

    DateTimeZone.SwitchZone(DateTimeZone.LocalNow(), -6)

    Example for SGT (UTC+8):

    DateTimeZone.SwitchZone(DateTimeZone.LocalNow(), ๐Ÿ˜Ž

    Example for EST (UTC-5):

    DateTimeZone.SwitchZone(DateTimeZone.LocalNow(), -5)

    Example for IST (UTC+5:30):

    DateTimeZone.SwitchZone(DateTimeZone.LocalNow(), 5.5)

     

1 Reply

  • You can use DateTimeZone.SwitchZone function, for example

    DateTime.LocalNow() leads to curent date and time at your location but the next fromula convert it to GMT (UTC+0)

    DateTimeZone.SwitchZone(DateTimeZone.LocalNow(), 0)

     


    Example for CST (UTC-6):

    DateTimeZone.SwitchZone(DateTimeZone.LocalNow(), -6)

    Example for SGT (UTC+8):

    DateTimeZone.SwitchZone(DateTimeZone.LocalNow(), ๐Ÿ˜Ž

    Example for EST (UTC-5):

    DateTimeZone.SwitchZone(DateTimeZone.LocalNow(), -5)

    Example for IST (UTC+5:30):

    DateTimeZone.SwitchZone(DateTimeZone.LocalNow(), 5.5)