Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Load DB2 TIME data
tunity5_at_yahoo.com wrote in message news:<32bcd267.0407032223.262ddbf5_at_posting.google.com>...
> I have some files that contain DB2 TIME data. It is not quite the
> DATE type found in Oracle: It only contains hours + minutes + seconds
> within a 24-hour period.
>
> My question is what is the best way to load this data into Oracle 9i?
> Ideally, I would like to preserve the "time" property, instead of
> converting it to a CHAR type during the load.
>
> Thanks in advance.
The Oracle date datatype column holds both date and time (to the second). See the SQL manual function to_date and it's associated format masks. Oracle also supports with version 9+ a timestamp datatype if you need time more accurate than to the second. See also to_timestamp, to_char, and trunc.
Example: to_date('2004-07-04 13:21:18','YYYY-MM-DD HH24:MI:SS')
The to_Date function is available for use with sqlldr also.
HTH -- Mark D Powell -- Received on Sun Jul 04 2004 - 12:36:01 CDT