Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Check date format and parse string to a date

I have a column with values like '20170128' , '20170129' , etc....
I am trying to find if the values follow the order "yyyyMMdd" and if at all they follow, insert as it is, else insert a null value.
say e.g. 
20170128 - 20170128
20172801 - NULL
TalendDate.isDate(row1.Column2,"yyyyMMdd")?TalendDate.parseDate("yyyyMMdd",row1.Column2):""
I used the above mentioned condition to list out the values in tMAP component. 

But I get an  error like 
"type mismatch cannot convert from object&serializable&comparable to date"


Can anyone please tell me what is the error in the above condition ? 

Thanks in advance..

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Hi
If the data type of output column is Date, try to change the expression to:
TalendDate.isDate(row1.Column2,"yyyyMMdd")?TalendDate.parseDate("yyyyMMdd",row1.Column2):null


Regards
Shong