cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid date/time error

rafael_hoff
Discoverer
0 Kudos

Hello everybody,

I have a problem when doing a request to an OData Service and trying to show the results in a sap.m.Table.

Sometimes I can get nullable results coming from this OData service, like:

<d:ValueDate m:type="Edm.DateTime">0000-00-00T00:00:00.0000000</d:ValueDate>

When this happens, I always get the error

2014-04-10 14:44:16 The following problem occurred: Invalid date/time value200,OK,{"d":{"results":[{"__metadata": ...


The definition of the EntityType is as follows:

<Property Name="ValueDate" Type="Edm.DateTime"/>

The property is defined like this, so I believe saying that can handle nullable values.

I am clueless of what could be the problem for that.

The error occurs in datajs.js, when executing the method invokeRequest.

Does anybody know what could be the problem?

Is this correct that I define a date as Edm.DateTime? Or should I use String instead?

Thanks,
Rafael

Accepted Solutions (0)

Answers (1)

Answers (1)

kammaje_cis
Active Contributor
0 Kudos

Rafael,

Yes, Date has to be Edm.DateTime.

I am not sure if I understood your question though. You already get the result from oData service with all zeroes. So oData service delivers data without any problem. When do you face the problem?

Thanks

Krishna