Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Talend Community,
I know there has been a few posts about this, but I still can't find the proper syntax in my tMap Output Column for a String Date Column having "" blank values. I've tried a lot of variations on this syntax and still no luck. I'm also formatting the string date into a new format after handling the NULL and blank values. The Java Run Time Error I'm getting is
java.lang.RuntimeException: java.text.ParseException: Unparseable date: ""
"".equals(row1.Mail_date) || row1.Mail_date == null ? "" : TalendDate.formatDate("yyyyMMdd",TalendDate.parseDate("MM/dd/yyyy",row1.Mail_date))
Can anyone in the community help me with this syntax
-Andrew
Try row1.Mail_date==null || row1.Mail_date.length()==0 ? ""
So should I make a Variable TalendDate.parseDate("yyyyMMdd",row1.Mail_date) to change my Source Data to Date Type and then use your statement below as the output to the column?
(row1.Mail_date != null)?TalendDate.formatDate("yyyyMMdd",row1.Mail_date):"
I didn't understand your question did you have blank char into Your String?
I do have Blank Source Data that needs handled with a tMap Expression.
Let me know thanks!
Try row1.Mail_date==null || row1.Mail_date.length()==0 ? ""