Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am getting "Unparseable date" error by using the below code.
"".equals(ColName) || ColName == null ? "" : TalendDate.formatDate("yyyy-MM-dd",TalendDate.parseDate("MM-dd-yyyy","ColName"))
Input is "Date" type, i am converting it to String type. I am also trying to replace null with blank values
Yes Manohar, it didnt work.
Also, the output table should store the date in "yyyy-mm-dd" format.
@samisyed80,what is the source date format? do you just need to convert date to string?
Source is DATE type, format "MM-dd-yyyy"
Destination is STRING type "yyyy-MM-dd"
@samisyed80,to convert date from one format to another use below way. are you loading to excel file out it doesnt matter sting or date
My source is Date type. but your example is having string type in source. Is that going to impact?
OK, now, i don't want null in this column, how to replace it with SPACE or BLANK?
@samisyed80,use this way
"".equals(ColName) || ColName == null ? "" : ColName
Some of the date rows are having null. If i put that code to replace with BLANK's then Cant convert String to Date error is throwing.
try the below one.