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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

unparsable date exception

i am trying  to generate csv after querying recods...and i am getting below error..is there any way to resolve this issue..

 

0683p000009M3Iw.png

 

Caused by: java.text.ParseException: Unparseable date: "2019-03-12T12:30:00.000Z"

error :

Exception in component tSalesforceInput_1 (datecheck)
org.talend.components.api.exception.ComponentException: UNEXPECTED_EXCEPTION
at org.talend.components.salesforce.runtime.SalesforceAvroRegistry$StringToDateConverter.convertToAvro(SalesforceAvroRegistry.java:349)
at org.talend.components.salesforce.runtime.SalesforceAvroRegistry$StringToDateConverter.convertToAvro(SalesforceAvroRegistry.java:333)
at org.talend.components.salesforce.runtime.BulkResultAdapterFactory$ResultIndexedRecord.get(BulkResultAdapterFactory.java:95)
at org.talend.codegen.enforcer.OutgoingSchemaEnforcer.get(OutgoingSchemaEnforcer.java:189)
at local_project.datecheck_0_1.datecheck.tSalesforceInput_1Process(datecheck.java:1886)
at local_project.datecheck_0_1.datecheck.runJobInTOS(datecheck.java:2771)
at local_project.datecheck_0_1.datecheck.main(datecheck.java:2620)
Caused by: java.text.ParseException: Unparseable date: "2019-03-12T12:30:00.000Z"
at java.text.DateFormat.parse(Unknown Source)
at org.talend.components.salesforce.runtime.SalesforceAvroRegistry$StringToDateConverter.convertToAvro(SalesforceAvroRegistry.java:347)
... 6 more
[statistics] disconnected

Job datecheck ended at 16:14 12/03/2019. [exit code=1]

Labels (5)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

i have changed data type from date to string then it worked

View solution in original post

7 Replies
manodwhb
Champion II
Champion II

@uganesh,the field you were extracting from saleforce,the date format is "yyyy-MM-dd'T'HH:mm:ss'.000Z'" since you might have changed the date format for that field in the schema of tsaleforceinput,your format should be "yyyy-MM-dd'T'HH:mm:ss'.000Z'"

 

If you want to connver the date format from one "yyyy-MM-dd'T'HH:mm:ss'.000Z'" to "dd/MM/yyyy" then do in the Output section of Tmap,just specifying the new date for the output column.

Anonymous
Not applicable
Author

if i don't change also getting same error...find below screenshot where format is same

 

0683p000009M3Nk.png

 

manodwhb
Champion II
Champion II

@uganesh ,i am not able to find the issue column,I am sure that there might be difference because of that you will get that date format issue.

Anonymous
Not applicable
Author

schema is same for both input and out put....the data which is coming from input is like 2019-03-12T10:36:46.055Z ...whether i need to parse this ?

 

manodwhb
Champion II
Champion II

@uganesh ,for this 2019-03-12T10:36:46.055Z  data the format should be "yyyy-MM-dd'T'HH:mm:ss'.000Z'",if you specify other than this in you will get error in tsalaforceinput  like unparsable date exception.

manodwhb
Champion II
Champion II

@uganesh,if this issue resloved,please mark the solution and also provide Kudos.

Anonymous
Not applicable
Author

i have changed data type from date to string then it worked