Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Hi, I have a CSV file with these parameters:
date_trunc;People_in_region
01.06.2017 00:01;4489
01.06.2017 00:19;4527
01.06.2017 00:31;4541
01.06.2017 00:46;4574
01.06.2017 01:01;4522
1/I have created a DataShape with two parameters:date_trunc as "datetime" and People_in_region as "Number"
2/ In my service code and my output as infotable:
var params = {
path: "k.csv" /* STRING */,
columnMappings:"date_trunc;People_in_region",
hasHeader: true /* BOOLEAN */,
//longitudeField: undefined /* NUMBER */,
//dateFormat: undefined /* STRING */,
fileRepository: "SystemRepository",
//latitudeField: undefined /* NUMBER */,
fieldDelimiter: ";" /* STRING */,
stringDelimiter: "\"" /* STRING */,
dataShape: "TFPeopledata" /* DATASHAPENAME */
};
var result = Resources["CSVParserFunctions"].ReadCSVFile(params);
When I execute the service, I get this error :
Wrapped java.lang.Exception: Unable To Convert From java.lang.String to DATETIME Cause: Unable To Convert From java.lang.String to DATETIME
any help please !
Solved! Go to Solution.
You missed dateFormat parameter, you should set something like.
dateFormat: "dd.MM.yyyy HH:mm"
Previous Date Format string it's based on Java Joda time library
You missed dateFormat parameter, you should set something like.
dateFormat: "dd.MM.yyyy HH:mm"
Previous Date Format string it's based on Java Joda time library