Parsing a date with possible single-digit month/day/year hour by using java.text.SimpleDateFormat

0 votes

I am creating a project in Talend Open Studio for Data Integration, in which I am getting an error while parsing the dates from the data source. The date is of “String” data type in the following format: 3/14/1967 0:00:00.

As per my research, I can see Talend is using java.text.SimpleDateFormat. I think SimpleDateFormat package handle the single-or-double digit problem. So, I am using “d-M-yyyy H:mm:ss” but still it gives me the following error: Unparsable date: 9/18/1994 0:00:00.

Can you suggest any solution for this or do I need to use a different date pattern?

Apr 3, 2018 in Talend by 93.lynn
• 1,550 points

edited Apr 3, 2018 by 93.lynn 851 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

If you look at your code, you can pretty much easily deduce the reason for your error. To put it simply, your input date pattern is “3/14/1947” i.e “M/d/yyyy” while the one you are using to specify it is “d-M-yyyy”. Moreover, for the separator, you are using is a hyphen (-) instead of a front slash (/).

answered Apr 3, 2018 by misc.edu04
• 1,380 points
0 votes

Try using M/d/yyyy format.

You might be using the format wrong because i have never faced this error.

answered Aug 3, 2018 by Nilesh
• 6,900 points

Related Questions In Talend

0 votes
1 answer
0 votes
1 answer

Using Java Classes in Talend

While working with routines, the very 1st ...READ MORE

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

How to load a set of files into database using Talend

Using tFileList component,  you can read all the files present ...READ MORE

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

How to generate multiple rows from a single row in Talend?

I think using tJavaFlex, tMap and tFlowToIterate ...READ MORE

answered Apr 18, 2018 in Talend by code.reaper12
• 3,450 points
793 views
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 453 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
52 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
360 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.