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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Number to date

Re: Number to date

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: Thu, 30 Mar 2000 16:33:07 GMT
Message-ID: <8bvvk2$4qv$1@nnrp1.deja.com>


In article <38E2DEE7.F54803AD_at_blarg.net>, Deepa Dinendra <dinendra_at_blarg.net> wrote:
> Hi,
> I have a table where a column representing date is storing information
> as number (seconds since Jan 1,1970 - from Unix system date). What is
> the best way to convert this number to a date when I query the table?
> One of the solutions I have in mind is divide the number of seconds by
> 86400(seconds in a day) and add it to Jan 1, 1970. but this doesn't
take
> care of the leap years. The table has data only from 1980.
>

See http://osi.oracle.com/~tkyte/Misc/CTime.html

> Thanks
> -Deepa
>
>

--
Thomas Kyte tkyte_at_us.oracle.com
Oracle Service Industries http://osi.oracle.com/~tkyte/index.html --
Opinions are mine and do not necessarily reflect those of Oracle Corp

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Mar 30 2000 - 10:33:07 CST

Original text of this message

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