Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Method not defined for parseDate()

Hi,
I am trying to convert a string that contains nulls into Date format. The data is in csv so I have a main connection to the tJavaRow with the code:
output_row.Date = input_row.Date.equals("")?null : parseDate("MM/dd/yyyy", input_row.Date)
Error:

The method parseDate(String, String) is undefined for the type ......
Labels (3)
1 Reply
Anonymous
Not applicable
Author

Hi 
tJavaRow doesn't support the expression like this
output_row.Date = input_row.Date.equals("")?null : parseDate("MM/dd/yyyy", input_row.Date)

You should use tMap component, and write the expression as:
row1.Date.equals("")?null:TalendDate.parseDate("MM/dd/yyyy",row1.Date)

Regards
Shong