When querying a TIMESTAMP WITH TIME ZONE column, is it possible to return the TIMESTAMP WITH TIME ZONE value using the time zone string (e.g. Americ Eastern) instead of the numeric offset (e.g. -04:00)? For example, I would like to return '9/26/2014 09:00:00.000 America Eastern' instead of '9/26/2014 09:00:00.000-04:00'.
Thanks in advance!
Which version of TD?
select current_timestamp at 'gmt' (title 'GMT TIME'),
current_timestamp at 'america pacific' (title 'America Pacific TIME'),
current_timestamp at 'america eastern' (title 'America Eastern TIME');
I dont fell there is timestamp format available to convert zone into string. You can have timezones converted to string using case statement. FORMAT 'YYYY-MM-DDBHH:MI:SS.S(F)Z'
The problem is that one time zone offset can be valid for multiple time zone names, so there is no universal way to do this. Even if you are dealing strictly with US time zones, not all locales observe daylight saving (plus for those that do, the start / end rules have changed over time).