Re: SQL*LOADER: converting ulong date-time to oracle format

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 10 May 1999 18:35:52 GMT
Message-ID: <373d26c8.23358958_at_192.86.155.100>


A copy of this was sent to Furkan Khan <khanf_at_home.com> (if that email address didn't require changing) On Mon, 10 May 1999 18:20:45 GMT, you wrote:

>select encode(*) from sys
>21,'Responder',26593,924751530,924755728,1,0,119,4,15,0,0,0,0
>
>In the above example, column 4 and 5 are the date/time stamps.
>They are standard Universal date time, when decoded with
>our proprietary function they look like:
>
>select date(sys_updated) from sys
>Wed, 21 Apr 1999 21:35:28 PDT
>
>Unfortunately, I can't use this date function, I need to directly
>translate from ulong to ORACLE date.
>
>Any help appreciated.
>
>Regards.
>fk

SQL> select
  2 to_char(
  3 new_time(to_date('01011970','ddmmyyyy')+1/24/60/60*924751530,'GMT','PDT'),   4 'dd-mon-yyyy hh24:mi:ss' ),
  5 to_char(
  6 new_time(to_date('01011970','ddmmyyyy')+1/24/60/60*924755728,'GMT','PDT'),   7 'dd-mon-yyyy hh24:mi:ss' )
  8 from dual
  9 /

TO_CHAR(NEW_TIME(TO_ TO_CHAR(NEW_TIME(TO_

-------------------- --------------------
21-apr-1999 20:25:30 21-apr-1999 21:35:28

See http://www.oracle.com/ideveloper/ for my column 'Digging-in to Oracle8i'...  

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Service Industries
Reston, VA USA

-- 
Opinions are mine and do not necessarily reflect those of Oracle Corporation
Received on Mon May 10 1999 - 20:35:52 CEST

Original text of this message