<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Rules for OData datetime properties in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/14031483#M4905366</link>
    <description>Hi Elkern , May i know how to pass the time stamp in gateway client which means there is an input parameter in CDS View with time stamp when i passed the input in odata link it says expected type is 'Edm.Datetimeoffset'?</description>
    <pubDate>Sun, 02 Mar 2025 14:24:52 GMT</pubDate>
    <dc:creator>Rakesh12</dc:creator>
    <dc:date>2025-03-02T14:24:52Z</dc:date>
    <item>
      <title>Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaq-p/9778331</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;There have been quite a few posts about problems with Edm.datetime properties in entities. Solutions offered are often on case by case basis, so it's hard to figure out why things have gone wrong and what the remedy is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;This is a short discussion (I hope!) to establish some rules for edm.datetime properties. If there are any exceptions to these rules, or some addtitional rules, please post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;&lt;STRONG&gt;Rule 1&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;Use the Edm type&lt;SPAN&gt; &lt;/SPAN&gt;&lt;STRONG&gt;datetime&lt;/STRONG&gt;. Don't maintain dates as edm.string "for convenience"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;&lt;STRONG&gt;Rule 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;Make the property nullable if a null value is possible. If there is a need for a value (mandatory) do not make it nullable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;&lt;STRONG&gt;Rule 3&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;The nullable attribute can only be correctly evaluated if the backend date contains '00000000' as a value. ABAP date values containing spaces (this is allowed unfortunately) will not be treated as null, but also not be able to convert to an edm.datetime - you will get a runtime error from the server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;&lt;STRONG&gt;Rule 4&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;Be aware of the&lt;SPAN&gt; &lt;/SPAN&gt;&lt;STRONG&gt;full&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;property definition. Giving your "date property" a type of edm.datetime alone is not enough to ensure proper conversion during OData parsing. See rules 5, 6 &amp;amp; 7.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;&lt;STRONG&gt;Rule 5&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;If the date property is part of a DDIC structure used for the entity definition, and that component is a DATS (elementary D type), then you can place a D type value in it directly, e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/302351" height="143" width="478" /&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/302304" height="83" width="276" /&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/302305" height="58" width="476" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;Valid ABAP:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ls_entity-date = sy-datum.&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;Dates of this type can fall into the "date is null but not valid" trap mentioned in rule 3.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;&lt;STRONG&gt;Rule 6&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;If the date property is&lt;SPAN&gt; &lt;/SPAN&gt;&lt;STRONG&gt;not&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;part of a DDIC structure and the entity definition is "freeform", you can also place a D type value in it directly if you assign its backend data typing: e.g.. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/302352" height="71" width="263" /&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/302353" width="450" /&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/jiveimages/302360" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;Dates of this type can fall into the "date is null but not valid" trap mentioned in rule 3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;&lt;STRONG&gt;Rule 7&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;If the date property is &lt;STRONG&gt;not &lt;/STRONG&gt;part of a DDIC structure, the entity definition is "freeform" and there is no backend data typing, the target must be filled as if it were a timestamp; this is because the MPC generated property type is a packed type field. In rules 5 and 6, the MPC generated property type is a D type.&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;Note that the edm.datetime will contain an additional portion representing microseconds, which is not normally filled unless drawn from a high resolution timestamp (i.e. more detailed than sy-uzeit).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;Dates of this type&lt;SPAN&gt; &lt;/SPAN&gt;&lt;STRONG&gt;cannot&lt;SPAN&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;fall into the "date is null but not valid" trap mentioned in rule 3. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Rule 8&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You may also use TIMESTAMP as the component type in a DDIC structure entity base instead of DATS. This can be converted as per rule 7. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;I'm sure there are more things we can add here: for example, I found that "json format" feed dates can look a bit "odd" - are they right or wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left; color: #575757; text-indent: 0px;"&gt;Ron.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 15:32:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaq-p/9778331</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-10-21T15:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778332#M3504306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Ron (and all),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that Edm.DateTime is not part of the V4 specification of odata.org anymore.&lt;/P&gt;&lt;P&gt;To anticipate V4, I recommend to use Edm.DateTimeOffset instead; this is already supported by NetWeaver Gateway.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 09:39:40 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778332#M3504306</guid>
      <dc:creator>stefan_schreck</dc:creator>
      <dc:date>2013-11-13T09:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778333#M3504307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Stefan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just when we think we've got to grips with the date and time options, it changes again!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expect some additions to this page when OData 4 comes along then...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ron. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Nov 2013 10:11:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778333#M3504307</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2013-11-13T10:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778334#M3504308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ron,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only difference between DateTime and DateTimeOffset is that the latter contains time-zoned values, e.g. a trailing Z for UTC. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Without time zone sender and receiver need out-of-band information to correctly interpret the values. DateTime was defined to have an undefined offset, so we removed it from OData 4.0. Which wasn't an easy decision. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;--Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Nov 2013 07:01:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778334#M3504308</guid>
      <dc:creator>RalfHandl</dc:creator>
      <dc:date>2013-11-29T07:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778335#M3504309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ron ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks. I am facing one new error:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;How do we pass datetime in Odata URL as blank, where Date is key field. Here I am using custom RFC.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;When i pass as &lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;Date=datetime'2014-05-14T00:00:00' I am able to get the values, but I want to pass Date field as blank. How do we do this ??&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;I tried different formats : &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;Date=datetime'0000-00-00T00:00:00'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;Date=datetime'00-00-00T00:00:00'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;Date=datetime''&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;Date=''&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;/sap/opu/odata/sap/ZSRV/GetReports(PoNo='12345',Date=datetime'')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I want to pass only one field in the parameter i.e. PoNo. Date field is required as this is input parameter&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tejas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 08:57:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778335#M3504309</guid>
      <dc:creator>tejasChouhan</dc:creator>
      <dc:date>2014-05-23T08:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778336#M3504310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tejas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a feed can return a null date then you should be able to send a null date too. Try sending it as &lt;SPAN class="cc-xml-attr-name" style="color: #994500; font-family: Consolas, 'Andale Mono', monospace; font-size: 13px; background-color: #f9f9f9;"&gt;m:null&lt;/SPAN&gt;&lt;SPAN style="color: #871280; font-family: Consolas, 'Andale Mono', monospace; font-size: 13px; background-color: #f9f9f9;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="cc-xml-attr-value" style="color: #1a1aa8; font-family: Consolas, 'Andale Mono', monospace; font-size: 13px; background-color: #f9f9f9;"&gt;"true". &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I've not done any updates involving blank dates recently, but that is what I'd be trying first if I were.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ron.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 10:00:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778336#M3504310</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-23T10:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778337#M3504311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Noh..gives me Invalid key predicate. &lt;SPAN __jive_emoticon_name="confused" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/776/images/emoticons/confused.gif"&gt;&lt;/SPAN&gt;&lt;SPAN __jive_emoticon_name="sad" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/776/images/emoticons/sad.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 10:22:08 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778337#M3504311</guid>
      <dc:creator>tejasChouhan</dc:creator>
      <dc:date>2014-05-23T10:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778338#M3504312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Tejas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've looked at this in the full context, and it doesn't look like a particulary consistent design. It makes no sense to assign a date to part of the key and not use it for updates. You either remove it from the defined key or pass it back in the PUT. Otherwise you are not complying with OData! You can't have an "optional" key field! &lt;SPAN __jive_emoticon_name="confused" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/776/images/emoticons/confused.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ron.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 10:44:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778338#M3504312</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-23T10:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778339#M3504313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Customer wants to check say: how many PO were created on that particular date. So my RFC has that input parameter, and if I am using mapping with RFC, i need to pass it as key value else gives me error . &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;May be I will have to try converting data type to Edm.String and then redefine the service and try calling manually the RFC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Tejas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 10:58:15 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778339#M3504313</guid>
      <dc:creator>tejasChouhan</dc:creator>
      <dc:date>2014-05-23T10:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778340#M3504314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the ABAP data type is just a date (DATS) without time portion, you will want to use the new type Edm.Date once V4 arrives in your Gateway. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My recommendation: use Edm.DateTimeOffset for time stamps (here the time zone matters) and Edm.DateTime as a work-around for pure date fields. Additionally annotate the date property with sap:display-format="Date", see &lt;A href="https://scn.sap.com/docs/DOC-44986#jive_content_id_Element_edmProperty" title="https://scn.sap.com/docs/DOC-44986#jive_content_id_Element_edmProperty"&gt;SAP Annotations for OData Version 2.0 | SCN&lt;/A&gt;. This will tell clients that only the date portion is relevant.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;P&gt;--Ralf&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 11:30:09 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778340#M3504314</guid>
      <dc:creator>RalfHandl</dc:creator>
      <dc:date>2014-05-23T11:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778341#M3504315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry that's just the result of awful design &lt;SPAN __jive_emoticon_name="cry" __jive_macro_name="emoticon" class="jive_macro_emoticon jive_macro jive_emote" src="https://community.sap.com/776/images/emoticons/cry.gif"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want to get help can you open a new thread as this isn't an issue with date format and isn't contributing any value to this thread.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 11:34:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778341#M3504315</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-05-23T11:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778342#M3504316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A better design would be to have an entity set "PurchaseOrders" with a single key property "PoNo" and a non-key property "Date". Then you can formulate a lot of questions your current design does not allow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;POs created at a given date:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GET ~/PurchaseOrders?$filter=Date eq datetime&lt;SPAN style="color: #333333; font-size: 15px; font-family: Calibri, sans-serif;"&gt;'2014-05-23T00:00' &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Number of POs created at a given date:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GET ~/PurchaseOrders/$count?$filter=Date eq datetime&lt;SPAN style="color: #333333; font-size: 15px; font-family: Calibri, sans-serif;"&gt;'2014-05-23T00:00' &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;POs created in a given period :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; GET ~/PurchaseOrders?$filter=Date ge datetime&lt;SPAN style="color: #333333; font-size: 15px; font-family: Calibri, sans-serif;"&gt;'2014-01-01T00:00' and Date le datetime'2014-03-31'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-size: 15px; font-family: Calibri, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 11:48:24 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778342#M3504316</guid>
      <dc:creator>RalfHandl</dc:creator>
      <dc:date>2014-05-23T11:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778343#M3504317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ron,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I followed your Rules, but I get a Dateformatt error - actually I got the before I found you thread &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a Gateway-Hub and a IW_BEP-Backend.&lt;/P&gt;&lt;P&gt;In the Backend an attribute is bound to a structure according to rule 5&lt;/P&gt;&lt;P&gt;Edm.DateTime &amp;lt;-&amp;gt; DATS Length 8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the service implementation (READ) I'm doing this:&lt;/P&gt;&lt;P&gt;er_entity-gbdat = ls_customer-gbdat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In debugger it is looking good: er_entity-gbdat = 19530321 (e.g.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But calling the service leads to the error "Format invalid: Gbdat - Value: 21.03.19"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If changed to Edm.DateTimeOffset I'm getting the error "21.0-3.-19" can't be interpreted as a number...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems like the DATS is somewhere converted to its output (21.03.1953) and&amp;nbsp; after this it is put into the Edm.-field...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you have an idea what is happening?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wishes,&lt;/P&gt;&lt;P&gt;Aksel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SP:&lt;/P&gt;&lt;P&gt;Backend:&lt;/P&gt;&lt;P&gt;IW_BEP&amp;nbsp; -&amp;gt; 200 08&lt;/P&gt;&lt;P&gt;Hub:&lt;/P&gt;&lt;P&gt;SAPGW_FND&amp;nbsp; -&amp;gt; 740 07&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 13:28:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778343#M3504317</guid>
      <dc:creator>Aksel</dc:creator>
      <dc:date>2014-07-10T13:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778344#M3504318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Aksel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The date type assignment in your model may be wrong. Edm.DateTime may imply that the date is type D but generation errors can create a different (incorrect) type. Check the 'type' declaration in the MPC to make sure of the type assignment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, I cannot see why this might consider the date to be invalid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ron. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Jul 2014 14:28:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778344#M3504318</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2014-07-10T14:28:59Z</dc:date>
    </item>
    <item>
      <title>Re: Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778345#M3504319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much. You brought us on the rigtht track:&lt;/P&gt;&lt;P&gt;In MPC we saw that our field Type GBDAT had a conversion exit inside: PDATE. That lead to the error. We created a new type without conversion exit and it works.&lt;/P&gt;&lt;P&gt;Wishes,&lt;/P&gt;&lt;P&gt;Aksel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Jul 2014 12:01:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778345#M3504319</guid>
      <dc:creator>Aksel</dc:creator>
      <dc:date>2014-07-16T12:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778346#M3504320</link>
      <description>&lt;P&gt;I suggest to proceed with this KBA in case of conversion issues in SAP Gateway:&lt;/P&gt;&lt;P&gt;2819936 - Check Project Consistency button in SEGW results in numerous warnings and/or error messages&lt;/P&gt;</description>
      <pubDate>Wed, 07 Aug 2019 08:31:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/9778346#M3504320</guid>
      <dc:creator>grabz</dc:creator>
      <dc:date>2019-08-07T08:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/13953816#M4894692</link>
      <description>&lt;P&gt;For me the issue was solved by using&amp;nbsp;&lt;SPAN&gt;Edm.DateTimeOffset&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Dec 2024 06:41:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/13953816#M4894692</guid>
      <dc:creator>Elkern</dc:creator>
      <dc:date>2024-12-03T06:41:28Z</dc:date>
    </item>
    <item>
      <title>Re: Rules for OData datetime properties</title>
      <link>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/14031483#M4905366</link>
      <description>Hi Elkern , May i know how to pass the time stamp in gateway client which means there is an input parameter in CDS View with time stamp when i passed the input in odata link it says expected type is 'Edm.Datetimeoffset'?</description>
      <pubDate>Sun, 02 Mar 2025 14:24:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/rules-for-odata-datetime-properties/qaa-p/14031483#M4905366</guid>
      <dc:creator>Rakesh12</dc:creator>
      <dc:date>2025-03-02T14:24:52Z</dc:date>
    </item>
  </channel>
</rss>

