two type conversions in one derivation
Posted: Mon Mar 25, 2013 12:12 am
Hi,
Iam trying to put something like below if then else condition in the derivation grid of my transformer.
If TRIM(DSLink219.COL5) = 'DATE' Then StringToDate(DSLink219.FIELD5,"%yyyy-%mm-%dd") Else StringToTimestamp(DSLink219.FIELD5,"%yyyy-%mm-%dd %hh:%nn:%ss")
I am getting the following compilation error, "Error in output column derivation expression for column FIELD5 in link DSLink232. Invalid conversion requested from a timestamp to a date."
I think it is not the proper way to two kinds of type conversions in one derivation but is there any other way of achieving the abvoce condition using one transformer.
Please advice
Iam trying to put something like below if then else condition in the derivation grid of my transformer.
If TRIM(DSLink219.COL5) = 'DATE' Then StringToDate(DSLink219.FIELD5,"%yyyy-%mm-%dd") Else StringToTimestamp(DSLink219.FIELD5,"%yyyy-%mm-%dd %hh:%nn:%ss")
I am getting the following compilation error, "Error in output column derivation expression for column FIELD5 in link DSLink232. Invalid conversion requested from a timestamp to a date."
I think it is not the proper way to two kinds of type conversions in one derivation but is there any other way of achieving the abvoce condition using one transformer.
Please advice