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

Datetime field to mashup

SOLVED
Not applicable

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

Re: Datetime field to mashup

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

1 REPLY 1

Re: Datetime field to mashup

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