Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Unparseable date error

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

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Yes Manohar, it didnt work. 

 

Also, the output table should store the date in "yyyy-mm-dd" format.

View solution in original post

11 Replies
manodwhb
Champion II
Champion II

@samisyed80,what is the source date format? do you just need to convert date to string?

Anonymous
Not applicable
Author

Source is DATE type, format "MM-dd-yyyy"

 

Destination is STRING type "yyyy-MM-dd"

manodwhb
Champion II
Champion II

@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

0683p000009Lwzh.png

Anonymous
Not applicable
Author

My source is Date type. but your example is having string type in source. Is that going to impact?

manodwhb
Champion II
Champion II

@samisyed80,sorry,previous worng screenshot.

 

find teh correct one.0683p000009LxJW.png

Anonymous
Not applicable
Author

OK, now, i don't want null in this column, how to replace it with SPACE or BLANK?

 

 

manodwhb
Champion II
Champion II

@samisyed80,use this way

"".equals(ColName) || ColName == null ? "" : ColName

Anonymous
Not applicable
Author

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. 

 

 

manodwhb
Champion II
Champion II

try the below one.0683p000009Lx2J.png