Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Help with converting UX Epoch to EST time

438181Dec 5 2006 — edited Dec 5 2006

Hi: I have a field which stores an integer value which is the Unix epoch time and need to convert it to a readable time in EST.

This time 1164412800 is Sat, 25 Nov 2006 00:00:00 GMT which is 11/24 19:00:00 EST. But the following query returns a GMT time even thought I am asking it to return EST.

SQL> select to_char(new_time(to_date('01/jan/1970 ','dd/mon/yyyy') + (1164412800/86400),'est','est'), 'yyyy-mm-dd hh24:mi:ss') from dual;

TO_CHAR(NEW_TIME(TO
-------------------
2006-11-25 00:00:00

Thanks
Ray

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2007
Added on Dec 5 2006
5 comments
1,115 views