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

Announcements
Qlik Connect 2026! Turn data into bold moves, April 13 -15: Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Edith1
Creator
Creator

Unparseable date - Convert JSON string to Date

I'm trying to convert a string field from tExtractJSONFields to a date.

The expression in tMap is TalendDate.parseDate("yyyy-MM-dd hh:mm:ss",row4.Date).

 

Here is the error:

Caused by: java.text.ParseException: Unparseable date: "["2020-03-09 15:21:53"]"  

 

The output column is DATE type, formatted "yyyy-MM-dd HH:mm:ss"

 

Please Help! 

Labels (2)
1 Solution

Accepted Solutions
Edith1
Creator
Creator
Author

Thanks for the reply @manodwhb. The expression is the same and the target data type is Date and date pattern is "yyyy-MM-dd HH:mm:ss". I am still getting the same unparsable date error.   

 

I did a test where I changed the target field as string and removed the expression. It's logging as ["2020-03-26 15:30:55"]

Do I need to replace the brackets and double quotes before the expression TalendDate.parseDate("yyyy-MM-dd hh:mm:ss",row4.Date)?

View solution in original post

3 Replies
manodwhb
Champion II
Champion II

@EdithM , the below expression working well. you need to check expression and data types of the target once.

 

TalendDate.parseDate("yyyy-MM-dd hh:mm:ss",row4.Date)

Edith1
Creator
Creator
Author

Thanks for the reply @manodwhb. The expression is the same and the target data type is Date and date pattern is "yyyy-MM-dd HH:mm:ss". I am still getting the same unparsable date error.   

 

I did a test where I changed the target field as string and removed the expression. It's logging as ["2020-03-26 15:30:55"]

Do I need to replace the brackets and double quotes before the expression TalendDate.parseDate("yyyy-MM-dd hh:mm:ss",row4.Date)?

manodwhb
Champion II
Champion II

@EdithM , yes you need to remove [" and ]" ,and then convert it will work.