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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

convert string to datetime for csv file

Hi,
I have a csv file contain string date '12/2/2012 5:47'. I convert to datetime but I got this error Unparseable date: "12/2/2012 5:47"
I try to save the file to excel it work. but for csv it become an error.
Please anyone help me....
Regards,
Ommie
Labels (3)
3 Replies
Anonymous
Not applicable
Author

Hi omie,
I have designed a demo job and made a testing for it. The job works well. Could you give us more info, such as your job screenshots and Date pattern so that we can address your issue quickly.
See my job screenshots as follows:
Best regards
Sabrina
0683p000009ME1x.png 0683p000009ME22.png 0683p000009ME27.png 0683p000009ME2C.png
Anonymous
Not applicable
Author

Hi Sabrina,
my date data sample is like this:
12/2/2012 0:00
12/2/2012 0:00
12/2/2012 0:00
12/2/2012 0:01
I already try the way what you did but got error :
java.lang.NumberFormatException: For input string: "12/2"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at routines.system.FastDateParser$DateTimeParser.parse(FastDateParser.java:206)
at routines.system.ParserUtils.parseTo_Date(ParserUtils.java:208)
at uc.testdate_0_1.testDate$1RowHelper_tFileInputDelimited_1.valueToConn(testDate.java:992)
at uc.testdate_0_1.testDate.tFileInputDelimited_1Process(testDate.java:1147)
at uc.testdate_0_1.testDate.runJobInTOS(testDate.java:1566)
at uc.testdate_0_1.testDate.main(testDate.java:1434)
Unparseable date: "12/2/2012 0:00"
Do you have any idea? For excel source file it work fine but only for csv file got error for date..
Regards,
Ommie
Anonymous
Not applicable
Author

Hi,
Everything is OK on my version Talend Open Studio for Data Integration(5.2.1r95165). How about checking out the option "Trim all column" in the advance setting of tFileInputDelimited component and make sure that there is no extra space in your "Date pattern"
Best regards
Sabrina
0683p000009ME2H.png