Skip to Content

SAP Odata - Datetime XML 0000-00-00T00:00:0

Hello,

I've created an odata service which has one property of type DateTime and is set as Nullable too. My question is the following when calling this odata service with the POST method, if I call this DateTime property with XML format and with the value 0000-00-00T00:00:0, I get an error, however, if I do exactly the same call in JSON format it doesn't trigger any error.

Any reason for this behavior?


Thank you in advance.

Kind regards,

Frederico

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Nov 01, 2018 at 06:56 PM

    Hi Frederico,

    You may want to check this out.

    https://www.w3.org/TR/xmlschema-2/#isoformats

    D.3.2 No Year Zero

    The year "0000" is an illegal year value

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 13, 2018 at 09:23 AM

    Hi Frederico,

    it is a bug.

    But it would be hard to fix it in the SAP Gateway framework because there may be applications that do not care whether such a value is sent.

    If the SAP Gateway framework would now start to raise errors those applications would stop to work.

    However, I will at least update the technical restriction note of SAP Gateway.

    https://launchpad.support.sap.com/#/notes/1574568

    Regards,

    Andre

    Add comment
    10|10000 characters needed characters exceeded