Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a column (string) containing dates in the format yyyyMMdd or 0 when the date is not indicated. I am trying to convert the string to date using this expression
getData.name.equals("0") ? null:(TalendDate.parseDate("yyyyMMdd",getData.name))
but I have this error
Exception in component tMSSqlOutput_1
java.sql.SQLException: Only dates in the AD era are accepted.
When I tried with tlogrow to see if the conversion worked after t_map, I have found that:
if I have 20060330 it returns 30-03-2006 ,but if it's 0 it returns 30-11-0002 , so it is not taking in account the first condition in my statement.
Do you have any Idea how to correct this?
Thank you
row2.name("00000000") ? null:(TalendDate.parseDate("yyyyMMdd",row2.name))