Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Help with DATE conversion based on sessiontimezone, dbtimezone
I would like to convert a date value in a select statement to the
session timezone. I know I can use NEW_TIME with the timezone
abbreviations, but dbtimezone and sessiontimezone returns offsets
(-05:00 for CST etc). not timezone abbreviations. Since I want to
adjust the date by the interval
between dbtimezone and sessiontimezone, Iwas thinking something like:
select new_time(old_date,
decode(dbtimezone,'-04:00','EST','-05:00','CST','-06:00','MST','-07:00','PST','-08:00','YST'),
decode(sessiontimezone,'-04:00','EST','-05:00','CST','-06:00','MST','-07:00','PST','-08:00','YST'))
but this doesn't seem very elegant, and I don't think very efficient for a large number of records. Any suggestions? Received on Fri Apr 28 2006 - 13:18:06 CDT
![]() |
![]() |