I have an input column of Varchar datatype which can have two formats:
ddmmyyyy or yyyymmdd. So to be able to process both types of records, I use the function
Code: Select all
If IsValidDate(StringToDate(StageVar, "%yyyy%mm%dd")) Then StringToDate(StageVar, "%yyyy%mm%dd")
Else
StringToDate(StageVar, "%dd%mm%yyyy")
Can anyone please guide me on thisConversion error calling conversion routine date_from_string data may have been lost
thanks
sriram