Issue with String to date

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
xch2005
Participant
Posts: 85
Joined: Fri Apr 29, 2005 3:13 am
Location: India

Issue with String to date

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply