The Timestamp is the localtime of the DB2 Server. The date was stored in the time zone Europe / Berlin.
I would like to convert the then stored date to UTC. Is there a way to calculate this in DB2 Dialect?
Advertisement
Answer
Check out the TO_UTC_TIMESTAMP scalar function
values TO_UTC_TIMESTAMP(TIMESTAMP'2019-10-01 00:00:00', 'Europe/Berlin')
Please note the second parameter is case sensitive. There is also a FROM_UTC_TIMESTAMP if needed.