Page 1 of 1

Issue with String to date

Posted: Wed Jun 22, 2011 3:03 pm
by xch2005
Hi All,

From source (.csv) file I have the date column value as 16-Dec-10 and when I try to load to Oracle with
StringToDate(Trim(Date1),"%dd-%mmm-%yyyy") error is thrown.

Transformer_130,0: Conversion error calling conversion routine date_from_string data may have been lost

The target Oracle table has the column as date.

Any suggestions please.

Thanks

Posted: Wed Jun 22, 2011 3:36 pm
by chulett
The "mask" you use with the function describes the incoming string's format, got nothing to do with what you want it to look like - a date is a date.

Posted: Wed Jun 22, 2011 4:48 pm
by ray.wurlod
Your format string specifies a four-digit year - your incoming data has only a two digit year. That suggests that what you need to do is to change the format string to use a two digit year.