SAP DS version 4.2 SP 6
I have a datetime field with the following code
ifthenelse(
is_valid_datetime(Q_SELECT.TIJDSTIP, 'YYYY-MM-DD HH24:MI:SS')=1,
to_date(Q_SELECT.TIJDSTIP,'YYYY-MM-DD HH24:MI:SS'),
raise_exception ('for the given inputfile an value not equel to timestamp is found on field TIJDSTIP, hence aborted')
)
with validation this code is invalid:
[Query:Q_check_datatypes]
Invalid mapping expression for column <Q_check_datatypes.TIJDSTIP>. Additional information: <Cannot parse expression.
For the call to function <ifthenelse>, cannot convert parameter number <3> to type <INT>. Provide a parameter of the correct type.. (BODI-1112351)>. (BODI-1111081)
the only way around i can image is to split the functionality into 2 field, one for test and raise on invalidation of the timestamp and 1 for the actual conversion to datetime when the inputfield is valid....
Is my code indeed not correct or is this a bug in DS?