Re: seconds from midnight into a date field?

  • From: Edgar Chupit <edgar.chupit@xxxxx>
  • To: "ryan.gaffuri@xxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 12 Jul 2004 16:01:39 +0300

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                  

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: