Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Convert Date to Number
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
![]() |
![]() |