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!

convert date to seconds since the Epoch

79406Jan 26 2004 — edited Jan 27 2004
Hello,

Is there a SQL or PL/SQL function to convert an Oracle DATE time representing local time to a number representing elapsed seconds since the Epoch (defined 1st Jan 1970 00:00 GMT) and vice-versa? I 've got some files with date (local times) stored in traditional formats and the database uniformly handles all date fields as NUMBER representing elapsed seconds since the Epoch. Note that 0 seconds since the epoch is 1st Jan 1970 00:00 in GMT time but should be, say 1st Jan 1970 03:00 for Eastern European Time zone (which is GMT+3 half of the calendar year and GMT+2 the other half according to daylight saving)

Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 24 2004
Added on Jan 26 2004
3 comments
6,180 views