Char to Date Datatype
Posted: Mon Aug 30, 2004 2:29 pm
I have a DB2 column and cannot populate it. My derivation is Ereplace(Oconv(Iconv(DataIN.EFFDT,"D-YMD[4'',2'',2]"), "D-YMD[4'',2'',2]"),"-",'').
Here is one of the error messages: Attempt to convert String value "2004 06 28" to Date type unsuccessful
Some values are null and I have this derivation within an If Else statement to cover the null values but have tried numerous derivations to try to get rid of the spaces and this String conversion is unsuccessful. I have taken out the dash, put a slash, used ICONV, OCONV, and a combination of the two. I have received some other ideas and tried those, and am out of suggestions.
Here is one of the error messages: Attempt to convert String value "2004 06 28" to Date type unsuccessful
Some values are null and I have this derivation within an If Else statement to cover the null values but have tried numerous derivations to try to get rid of the spaces and this String conversion is unsuccessful. I have taken out the dash, put a slash, used ICONV, OCONV, and a combination of the two. I have received some other ideas and tried those, and am out of suggestions.