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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: seconds from midnight into a date field?

Re: seconds from midnight into a date field?

From: Edgar Chupit <edgar.chupit_at_rs.lv>
Date: Mon, 12 Jul 2004 16:01:39 +0300
Message-ID: <69616652.20040712160139@rs.lv>


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_at_freelists.org put 'unsubscribe' in the subject line.
--

Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html
Received on Mon Jul 12 2004 - 07:58:37 CDT

Original text of this message

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