Unanswered: retrieve timezone from timestamp value
Is there any way to retrieve the time zone value from timestamp value in db2.For eg: if i give the timestamp '2013-04-25-21.12.30.000000' as input in query , i need to get the corresponding timezone for timestamp as output .Please let me know way to do this
There is no timezone information in timestamps.
If your timestamp is in a local timezone, you can get the corresponding UTC time by this:
timestamp('2013-04-25-21.12.30.000000') - current timezone
If this is still not you want to get, then please, provide us your understanding of "retrieving timezone from a timestamp" with some example: what you have and what you want to get...
Our problem is when i give select TIMESTAMP('2004-06-30T00:00:00') - CURRENT TIMEZONE from
sysibm.sysdummy1 as input i am getting the out put as 2004-06-30-04.00.00
where as when i give select TIMESTAMP('2005-03-18T00:00:00') - CURRENT TIMEZONE from
sysibm.sysdummy1 the output is 2005-03-18-05.00.00. Is the time zone dependent on some column?How can we know timezone for a column in that case?