Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: correct to_date function question
On Wed, 7 Nov 2001 12:05:53 -0600, "SG" <sajnish_gupta_at_yahoo.com>
wrote:
>Thanks for your replies, but sorry, I messed up my earlier question. I am
>trying to convert the UNIX date (in seconds since 1970) to date:
>
>SQL> select to_date((to_date('01-JAN-1970','DD-MON-YYYY') + 11417329.3))
>from dual;
should be:
SELECT TO_DATE('01-JAN-1970','DD-MON-YYYY') + 11417329.3 FROM DUAL; Adding a number to a date returns a date by default.
However, this is adding 11 million days to your date, which is rather a lot. There have only been around 11000 days since 1970. Received on Wed Nov 07 2001 - 12:10:07 CST