Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: EPOCH date conversion?

RE: EPOCH date conversion?

From: Bobak, Mark <Mark.Bobak_at_il.proquest.com>
Date: Mon, 1 Mar 2004 16:14:03 -0500
Message-ID: <4C9B6FDA0B06FE4DAF5918BBF0AD82CFECFC28@bosmail00.bos.il.pqe>


Scott,  

I think one of your dates is just *slightly* off. If you do: select to_date('02-13-2004 17:14:06','MM-DD-YYYY HH24:MI:SS') - 38030.7181 from dual;  

You get a date of 1899-12-30 00:00:02, which is almost exactly 2 days off from 1900-01-01 00:00:00. So, is is possible one of your data points is a little off?  

I think it should be either:
02-13-2004 17:14:06, 38028.71813
or
02-15-2004 17:12:37, 38030.7181  

Either of which comes out to an epoch of 1900-01-01 00:00:00 exactly.  

Or, the other possiblility is that it's just a coincidence that those numbers came out so close to 1900-01-01 00:00:00, but in fact the epoch is some other completely unknown quantity, and I'm totally off base.  

Hope that helps,  

-Mark
 

PS Don't forget I could be completely off....wouldn't want to send you down a rabbit hole....;-)    

-----Original Message-----

From: Scott Graves [mailto:scott.graves_at_mo.nisc.cc] Sent: Monday, March 01, 2004 3:48 PM
To: Oracle-L
Subject: EPOCH date conversion?  

One of the 3rd party code managements systems we use stores dates as numbers. The Access function ctime() will correctly interpret the date into a valid date format via an ODBC connection. I'm trying to duplicate this function in sqlplus. They tell me that the value of 38030.7181 equates to 2/13/2004 5:14:06PM.  

I tried several of the date conversions in metalink that convert EPOCH dates, but was unable to get any to produce the desired results. If anyone has any ideas, I would greatly appreciate it.  

Scott Graves
Sr. Systems Programmer
NISC RDQ-STP
Email: scott.graves_at_nisc.cc
Phone: 636-922-9122 x7616
Fax: 636-922-2080  



Please see the official ORACLE-L FAQ: http://www.orafaq.com

To unsubscribe send email to: oracle-l-request_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
Received on Mon Mar 01 2004 - 15:11:12 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US