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

From: Marc Mazerolle <>
Date: Mon, 10 May 1999 18:41:48 GMT
Message-ID: <>

Here is a SQL*Loader CTL file i use to load C++ time_t fields into Oracle :

load data characterset us7ascii
infile "whatever.dat" "fix 26"
into table dulf_data
car_number smallint ,
location_id char(7),
event_level_rev position(10) byteint "ROUND(:EVENT_LEVEL_REV/16)", event_level_code position(10) byteint "MOD(:EVENT_LEVEL_REV,16)", diagnostic_code smallint,
first_set integer
"to_date('1970-01-01','YYYY-MM-DD')+(:FIRST_SET/60/60/24)", last_set integer
"to_date('1970-01-01','YYYY-MM-DD')+(:LAST_SET/60/60/24)", last_reset integer

counter smallint
<end cut><end cut>

time_t fields are expressed in a long as seconds since January 1st,1970.

Is this any help ?


Marc Mazerolle
InforMaze Technologies

Furkan Khan 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
Received on Mon May 10 1999 - 20:41:48 CEST

Original text of this message