Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: seconds from midnight into a date field?
Hello ryan,
Monday, July 12, 2004, 3:54:35 PM, you wrote:
rgcn> I have a varchar field that I need to migrate to a date field. it is in the form 'seconds from midnight' and looks like this rgcn> 0001 rgcn> 0050 rgcn> 1054 rgcn> I can't find a to_date function to translate that. do any exist?
Table 2-16 Datetime Format Elements:
SSSSS Yes Seconds past midnight (0-86399).
SQL> select dt, to_date( dt, 'SSSSS')
2 from tt1
3 /
DT TO_DATE(DT,'SSSSS')
---- --------------------
0001 01.07.2004. 00:00:01 0050 01.07.2004. 00:00:50 1054 01.07.2004. 00:17:34
--
Best regards,
Edgar
![]() |
![]() |