Click to See Complete Forum and Search --> : Date Type Cover


Cappuccino
07-11-2002, 03:14 AM
Dear all,

I got a table of Online Registration Information to analyze, but the DateType is numerical, which I think it records how many seconds since 1970 Jan 1. How can I cover the Date type into 'YYYY-MM-DD'? Is there any funtion?

Thanks in advance!!!

jmodic
07-11-2002, 03:57 AM
If your number realy means the seconds elapsed since 1970 Jan 1, then you can get the date from it by using:

TO_DATE('1970-01-01','YYYY-MM-DD') + :my_var/(24*60*60)

Here :my_var represents your number of elapsed seconds since 1970-01-01. The expression 24*60*60 is the number of seconds in one day.

Cappuccino
07-11-2002, 05:14 AM
Thank you, Jmodic

I checked it again, it is Millisecond since 1970 Jan 1.

Thanks