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

Home -> Community -> Usenet -> c.d.o.server -> correct to_date function question

correct to_date function question

From: SG <sajnish_gupta_at_yahoo.com>
Date: Wed, 7 Nov 2001 12:05:53 -0600
Message-ID: <3be9776b$0$2302$724ebb72@reader2.ash.ops.us.uu.net>


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;

TO_DATE((TO_DATE('01


ORA-01847: day of month must be between 1 and last day of month

I calculated the 11417329.3 by taking the column_name (Number) and dividing it by 86400. So the detailed query looks like: SQL> select to_date((to_date('01-JAN-1970','DD-MON-YYYY') + to_number(COL_NAME/86400))) from dual;

thanks again
SG Received on Wed Nov 07 2001 - 12:05:53 CST

Original text of this message

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