cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Datetime field to mashup

DD_7886593
2-Guest

Datetime field to mashup

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 !

1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

1 REPLY 1

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

Top Tags