Forum Discussion

fredrikahnell's avatar
fredrikahnell
Frequent Visitor
6 years ago
Solved

Switch time zone based on column

Hi

I have a stored datetimezone value is utc+2 and i have a seperate column with the utc for the server that the record is based on. So I am trying to use the function DateTimeZone.SwitchZone([starts_at_utc2], [server_time_utc]) 

 

 

But i only get error when using a column [server_time_utc ] in the hour time field 

 

Is is possible to solve it?

 

  • Did found the problem, server_time_utc was in text format. Converted it to whole number at it works 🙂 

3 Replies

    • fredrikahnell's avatar
      fredrikahnell
      Frequent Visitor

      If server_time_utc is 2 I expect the same value. If I have "2020-02-20 16:00:00 +02:00" and server time -5 I expect the value as i have written -5 in the formula, "2020-02-20 09:00:00 -05:00"

  • fredrikahnell's avatar
    fredrikahnell
    Frequent Visitor

    Did found the problem, server_time_utc was in text format. Converted it to whole number at it works 🙂