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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Ferdinand_CUNY
Contributor
Contributor

Convert String from Excel to Date

Hello,

I would like to load data from Excel File to DB.

Format in Excel is String and Date in targe table.

But, the string value is in this format: "Wed Dec 30 00:00:00 CET 2020"

How I can conert to date format

Caused by: java.text.ParseException: Unparseable date: "Wed Dec 30 00:00:00 CET 2020"

at java.text.DateFormat.parse(Unknown Source)

at routines.TalendDate.parseDate(TalendDate.java:929)

Labels (2)
2 Replies
Anonymous
Not applicable

Hello,

You can use built-in function TalendDate.parse to parse String to Date.

Here exist a component tConvertType which is also used to convert one Talend java type to another automatically, and thus avoid compiling errors.

Let us know if it helps.

Best regards

Sabrina

 

Ganshyam
Creator II
Creator II

Hello,

 

Try below.

TalendDate.parseDate("dd/MM/yyyy",TalendDate.formatDate("dd/MM/yyyy",TalendDate.parseDate("EEE MMM dd HH:mm:ss Z yyyy",row1.Ship_Date))) 

0693p00000BASYgAAP.png 

Regards