ParseException: Unparseable date:

Hi,
I am getting following error while converting a string into Date
Exception in component tMap_1
java.lang.RuntimeException: java.text.ParseException: Unparseable date: "2011-3-17 9.34.31.608000000 +1:00"
at routines.TalendDate.parseDate(TalendDate.java:503)
at imint_job.timestamp_test_0_1.Timestamp_test.tOracleInput_1Process(Timestamp_test.java:1755)
at imint_job.timestamp_test_0_1.Timestamp_test.runJobInTOS(Timestamp_test.java:4723)
at imint_job.timestamp_test_0_1.Timestamp_test.main(Timestamp_test.java:4481)
Caused by: java.text.ParseException: Unparseable date: "2011-3-17 9.34.31.608000000 +1:00"
at java.text.DateFormat.parse(Unknown Source)
at routines.TalendDate.parseDate(TalendDate.java:501)

Please find the screenshot of tMap attached where i am converting the String value to Data.
Can Anyone help me on this.
Thanks,
Vivek Jayapalan
2 REPLIES
Employee

Re: ParseException: Unparseable date:

Hi Vivek,
What date pattern are you using within your tMap, in the parseDate function ? What is the source date format ?
Did you try using a tSchemaComplianceCheck before your tMap to make sure that the date to be parsed is properly formatted ?
Regards,
Cyril

Re: ParseException: Unparseable date:

Hello Cyril,
My source Data type in the DB is Timestamp with Timezone, but in Talend i am extracting it as String, means, Talend Source table schema i had kept datatype as String and i am trying to convert String to Date thats where the problem is happening.
When i simply passed the source date to tLogrow i got this value in Run console : "2011-3-17 9.34.31.608000000 +1:00"

I tried using this format 'yyyy-MM-dd HH:mm:ss.SSS aa Z' in the ParseDate function same time i gave date patern for the target table output in tMap as 'yyyy-MM-dd HH:mm:ss.SSS aa Z' . But i am getting error mentioned in the previous post.
Thanks,
Vivek