Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Number to date
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