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

Home -> Community -> Usenet -> c.d.o.server -> Re: Convert Date to Number

Re: Convert Date to Number

From: John Kachurick <jokach_at_epix.net>
Date: Thu, 10 Apr 2003 17:33:37 GMT
Message-ID: <3E95AAEF.5090805@epix.net>


I don't know if its the best way, but I have an app that saves the date in unix time as a number in the database, and I used this script to see what it is:

select to_char(to_date('01-JAN-70')+((timestamp/1000)/86400), 'MM-DD-YY HH24:MI:SS') from auditlog;

As I stated, this works for me.
HTH
John

David COSTE wrote:
> Hello all,
>
> Does someone know if there is a simple way to convert dates in number with
> Oracle 9.2.0.
> For example, how to convert a date in a number of seconds elapsed since
> 1/1/1970 at 0:00:00 ?
>
> Thanks in advance
> David
>
>
Received on Thu Apr 10 2003 - 12:33:37 CDT

Original text of this message

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