Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> correct to_date function question
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
![]() |
![]() |