Conversion 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
hargun
Participant
Posts: 188
Joined: Mon May 16, 2011 7:41 pm
Location: United States

Conversion error

Post by hargun »

hi,

i am getting error while converting string to date .

My job design

DB2 stage.........xfm............peek stage

the date field NEXT_PMT_DATE(VARCHAR(10) and i am using the following code

Code: Select all

If IsNull(select_stats.NEXT_PMT_DATE) then SetNull() 
Else If IsValidDate(StringToDate(select_stats.NEXT_PMT_DATE,"%yyyy-%mm-%dd")) then StringToDate(select_stats.NEXT_PMT_DATE,"%yyyy-%mm-%dd")
       Else SetNull()

the job getting aborted with below error

APT_CombinedOperatorController,1: Conversion error calling conversion routine date_from_string data may have been lost

i tried by using the reject link and got NEXT_PMT_DATE:2013-02-30 in reject link since it is valid date i don't know why it is getting rejected.

Please help me on this.
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

February 30th isn't a valid date. Not even on a leap year.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

(What Andy said plus) not even if you're using a Microsoft operating system!
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