Click to See Complete Forum and Search --> : Truncate time using SQL Loader


shivam
10-01-2008, 06:22 AM
Hi,
I have a date field in my data file containing date + time, like, 2002-12-24 08:54:40.29.

I need to insert this field in 'MM/DD/YYYY' format in the table using SQL Loader. Is there a way to truncate the time?

Can anyone please suggest an option to do so at the earliest as this is urgent!

Thanks.

PAVB
10-01-2008, 06:45 AM
You can include to_char() function in your SQL*Loader list of columns, lke...

MyColumn EXPRESSION "to_char(MyDate, 'mm/dd/yyyy')"

shivam
10-01-2008, 08:35 AM
Thanks!

I tried one more option which worked for me -
MyColumn "To_date(substr(:MyColumn,1,10),'YYYY-MM-DD')"