Troubleshooting
Problem
Using the IsValid function to check for a valid date. However, the function throws a warning if there is an actual bad date. In DataStage v7 and v8.1, there is no warning but in v8.5 and above, a warning appears. Some examples: Scenario 1: StageVar=20141231 If IsValidDate( "2014-12-31" ) Then "Valid" Else "InValid" Returns= Valid No Log Warnings Scenario 2: StageVar=20143112 If IsValidDate(" 2014-31-12" ) Then "Valid" Else "InValid" Returns= InValid Log Warnings= Conversion error calling conversion routine date_from_ustring data may have been lost Scenario 3: StageVar=20143112 If IsValidDate(StringToDate( "2014-31-12" ,"%yyyy-%mm-%dd")) Then "Valid" Else "InValid" Returns= InValid Log Warnings= APT_CombinedOperatorController,1: Conversion error calling conversion routine date_from_string data may have been lost
Log InLog in to view more of this document
Was this topic helpful?
Document Information
Modified date:
25 April 2025
UID
swg21672650