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,450 points
4,445 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

Hope this was what you were looking for. 

Get your Talend certification today to become certified professional.

Thanks.

answered Apr 19, 2018 by code.reaper12
• 3,500 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 11, 2018 in Talend by code.reaper12
• 3,500 points

edited Apr 11, 2018 by code.reaper12 6,535 views
0 votes
1 answer

tWaitForFile component insufficiency in Talend

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

answered Apr 11, 2018 in Talend by geek.erkami
• 2,680 points
2,509 views
0 votes
1 answer

Looping through all the schemas in Talend

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

answered Apr 11, 2018 in Talend by code.reaper12
• 3,500 points
1,902 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,500 points
3,983 views
0 votes
1 answer

Parsing JSON in Talend

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

answered Apr 3, 2018 in Talend by code.reaper12
• 3,500 points
4,103 views
0 votes
1 answer
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP