Skip to Content
0
Apr 10, 2014 at 01:52 PM

Invalid date/time error

312 Views

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