StringToDate Error

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
cfuller
Premium Member
Premium Member
Posts: 70
Joined: Mon Mar 24, 2003 10:08 pm
Location: Australia

StringToDate Error

Post by cfuller »

Hi

Trying to convert a number of '19760109' to a date field in Oracle. When I use the StringToDate function with map of '%yyyy%mm%dd' I get the following error message -
APT_CombinedOperatorController,0: Data string ' 1976010' does not match format '%yyyy%mm%dd': an integer was expected to match tag %yyyy.

You can see from the message that it looks like it has truncated the incoming field losing the last digit. Has anyone seen this before, or have I made an error with my mapping?

:?
Regards
Chris Fuller

"Reality is what refuses to go away when you stop believing in it"
rohithmuthyala
Participant
Posts: 57
Joined: Wed Oct 21, 2009 4:46 am
Location: India

Post by rohithmuthyala »

If you observe the error message there is a space coming in front of the string,trimming the string before the conversion can help.
Rohith
cfuller
Premium Member
Premium Member
Posts: 70
Joined: Mon Mar 24, 2003 10:08 pm
Location: Australia

Post by cfuller »

Thanks Rohith...missed that space completely... :oops:
Regards
Chris Fuller

"Reality is what refuses to go away when you stop believing in it"
Post Reply