Parsing Date Error in Talend

0 votes

I have an excel file that contains data in the date format but it's of “String” data type. I need to upload this data into a database but before that, I need to cast the date from “String” to “Date” data type. I tried using tConvertType to perform this. But it is throwing an error saying:

java.text.ParseException: Unparseable date: "Tue Jul 17 00:00:00 EDT 1973"

Can someone point out what I am doing wrong?

Below is the screenshot of my job:

image

Apr 19, 2018 in Talend by misc.edu04
• 1,380 points
485 views

1 answer to this question.

0 votes

This job doesn’t needs tConvertType. You can easily perform the conversion or casting of data type from within the tMap component's Expression Builder. All you need is the correct expression to give the a correct date format. You can try using the below expression in your tMap:

input_DateColumn!=null && !"".equalsIgnoreCase(input_DateColumn)? TalendDate.parseDateLocale("EEE MMM dd HH:mm:ss zzz yyyy", input_DateColumn, "EN") :null

answered Apr 19, 2018 by code.reaper12
• 3,450 points

Related Questions In Talend

0 votes
1 answer
0 votes
2 answers
0 votes
1 answer

Converting Columns into Rows in Talend

Hi, You can try using tNormalize component along ...READ MORE

answered Apr 10, 2018 in Talend by code.reaper12
• 3,450 points

edited Apr 10, 2018 by code.reaper12 676 views
0 votes
1 answer

tWaitForFile component insufficiency in Talend

Regarding your first issue, tWaitForFile component provides ...READ MORE

answered Apr 10, 2018 in Talend by geek.erkami
• 2,320 points
287 views
0 votes
1 answer

Looping through all the schemas in Talend

It is really simple to make tOracleInput ...READ MORE

answered Apr 10, 2018 in Talend by code.reaper12
• 3,450 points
92 views
0 votes
1 answer
0 votes
1 answer

Adding third party libraries into the Talend project

You can add the 3rd party libraries ...READ MORE

answered Apr 9, 2018 in Talend by code.reaper12
• 3,450 points
332 views
0 votes
1 answer

Parsing JSON in Talend

While working with JSON files, one thing ...READ MORE

answered Apr 2, 2018 in Talend by code.reaper12
• 3,450 points
481 views