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: Mark Moynahan <Mark.Moynahan_at_apollogrp.edu>
Date: Mon, 12 Jul 2004 10:11:07 -0700
Message-ID: <73BB49215339D743903095833FFE4B17DA504C@apophxex4.apollogrp.edu>

If you're running on 9i you can do something like this:

alter session set nls_date_format='dd-mon-yyyy hh24:mi:ss';

markis_at_PRACTICE>select numtodsinterval(0001,'SECOND')+trunc(sysdate)dt from dual;

DT



12-jul-2004 00:00:01

markis_at_PRACTICE>select numtodsinterval('0050','SECOND')+trunc(sysdate)dt from dual;

DT



12-jul-2004 00:00:50

markis_at_PRACTICE>select numtodsinterval('0054','SECOND')+trunc(sysdate)dt from dual;

DT



12-jul-2004 00:00:54

HTH, Mark

-----Original Message-----

From: oracle-l-bounce_at_freelists.org
To: oracle-l_at_freelists.org
Sent: 7/12/2004 5:54 AM
Subject: seconds from midnight into a date field?

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 0001
0050
1054
I can't find a to_date function to translate that. do any exist?



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 - 12:23:20 CDT

Original text of this message

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