<?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>topic Re: date calculation in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-calculation/m-p/1938498#M387910</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   I am not sure if the output mentioned by you is correct. I got the followed the same code and got the following output:&lt;/P&gt;&lt;P&gt;19955011          &lt;/P&gt;&lt;P&gt;80044988          &lt;/P&gt;&lt;P&gt;19955011          &lt;/P&gt;&lt;P&gt;The principle is simple as you would already have discovered,&lt;/P&gt;&lt;P&gt;inversion 1 = 99999999 - date&lt;/P&gt;&lt;P&gt;back  = 99999999 - date&lt;/P&gt;&lt;P&gt;Hope this helps. &lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;~i1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 17 Feb 2007 17:52:21 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-17T17:52:21Z</dc:date>
    <item>
      <title>date calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-calculation/m-p/1938497#M387909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could someone explain me the following from the code below:-&lt;/P&gt;&lt;P&gt;q1]] How do we get "80049488"  in the 1st output?&lt;/P&gt;&lt;P&gt;q2]] why there is no difference between the outputs in the 3rd &amp;amp; 4th cases?:&lt;/P&gt;&lt;P&gt;q3]] what is the possible answer  to the question "Inverted Dates"? &lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;HR originaltext="------------" /&gt;&lt;P&gt;Inverted Dates&lt;/P&gt;&lt;P&gt;In some cases (for example, when sorting dates in descending order), it is useful to convert a&lt;/P&gt;&lt;P&gt;date from format D to an inverted date by using the keyword CONVERT&lt;/P&gt;&lt;P&gt;CONVERT DATE &amp;lt;d1&amp;gt; INTO INVERTED-DATE &amp;lt;d2&amp;gt;.&lt;/P&gt;&lt;P&gt;Afterwards, you can convert the inverted data back into a normal date using the statement&lt;/P&gt;&lt;P&gt;CONVERT INVERTED-DATE &amp;lt;d1&amp;gt; INTO DATE &amp;lt;d2&amp;gt;.&lt;/P&gt;&lt;P&gt;These statements convert the field &amp;lt;d1&amp;gt; from the formats DATE or INVERTED-DATE to the&lt;/P&gt;&lt;P&gt;formats INVERTED-DATE or DATE and assign it to the field &amp;lt;d2&amp;gt;.&lt;/P&gt;&lt;P&gt;For the conversion, ABAP forms the nine's complement.&lt;/P&gt;&lt;P&gt;DATA: ODATE TYPE D VALUE '19955011',&lt;/P&gt;&lt;P&gt;IDATE LIKE ODATE.&lt;/P&gt;&lt;P&gt;DATA FIELD(8).&lt;/P&gt;&lt;P&gt;FIELD = ODATE. WRITE / FIELD.&lt;/P&gt;&lt;P&gt;CONVERT DATE ODATE INTO INVERTED-DATE IDATE.&lt;/P&gt;&lt;P&gt;FIELD = IDATE. WRITE / FIELD.&lt;/P&gt;&lt;P&gt;CONVERT INVERTED-DATE IDATE INTO DATE ODATE.&lt;/P&gt;&lt;P&gt;FIELD = ODATE. WRITE / FIELD.&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;80049488&lt;/P&gt;&lt;P&gt;19955011&lt;/P&gt;&lt;P&gt;1995501&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Feb 2007 13:52:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-calculation/m-p/1938497#M387909</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-17T13:52:12Z</dc:date>
    </item>
    <item>
      <title>Re: date calculation</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-calculation/m-p/1938498#M387910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;   I am not sure if the output mentioned by you is correct. I got the followed the same code and got the following output:&lt;/P&gt;&lt;P&gt;19955011          &lt;/P&gt;&lt;P&gt;80044988          &lt;/P&gt;&lt;P&gt;19955011          &lt;/P&gt;&lt;P&gt;The principle is simple as you would already have discovered,&lt;/P&gt;&lt;P&gt;inversion 1 = 99999999 - date&lt;/P&gt;&lt;P&gt;back  = 99999999 - date&lt;/P&gt;&lt;P&gt;Hope this helps. &lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;~i1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Feb 2007 17:52:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-calculation/m-p/1938498#M387910</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-17T17:52:21Z</dc:date>
    </item>
  </channel>
</rss>

