<?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 Issue with the date in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-the-date/m-p/2072464#M429399</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;If I execute the following code i am getting 32757 for cdays. Please tell me the reason or the calculation behind this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZTEST                         .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: z_datum type d,&lt;/P&gt;&lt;P&gt;      erdat type d,&lt;/P&gt;&lt;P&gt;      cdays(5) type n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;z_datum = sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cdays = z_datum - erdat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Mar 2007 09:17:59 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-03-21T09:17:59Z</dc:date>
    <item>
      <title>Issue with the date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-the-date/m-p/2072464#M429399</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;If I execute the following code i am getting 32757 for cdays. Please tell me the reason or the calculation behind this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT  ZTEST                         .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data: z_datum type d,&lt;/P&gt;&lt;P&gt;      erdat type d,&lt;/P&gt;&lt;P&gt;      cdays(5) type n.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;z_datum = sy-datum.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cdays = z_datum - erdat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 09:17:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-the-date/m-p/2072464#M429399</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-21T09:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with the date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-the-date/m-p/2072465#M429400</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;that's correct ! You are calculating the number of days between the current date (sy-datum) and the initial date (???). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;Hans&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 09:19:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-the-date/m-p/2072465#M429400</guid>
      <dc:creator>h_senden2</dc:creator>
      <dc:date>2007-03-21T09:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with the date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-the-date/m-p/2072466#M429401</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;erdat is 00000000.&lt;/P&gt;&lt;P&gt;sy-datum = 20070321&lt;/P&gt;&lt;P&gt;so 32757 days have passed after the first day in AD.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ravi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 09:20:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-the-date/m-p/2072466#M429401</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-21T09:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with the date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-the-date/m-p/2072467#M429402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;chk this , it will give 732757 no of days , divide this by 365 , it will give 2007 years till now&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REPORT YCHATEST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: Z_DATUM TYPE D,&lt;/P&gt;&lt;P&gt;ERDAT TYPE D,&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;CDAYS(7) TYPE N.&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Z_DATUM = SY-DATUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CDAYS = Z_DATUM - ERDAT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE : CDAYS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 09:22:19 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-the-date/m-p/2072467#M429402</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-21T09:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with the date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-the-date/m-p/2072468#M429403</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;u r getting the result as number of days between those two dates.&lt;/P&gt;&lt;P&gt;if u want to get in &lt;/P&gt;&lt;P&gt;Use this FM &amp;lt;b&amp;gt;HR_HK_DIFF_BT_2_DATES&amp;lt;/b&amp;gt; to get the difference between dates in Years, Months and Days by specifying  OUTPUT_FORMAT parameter.&lt;/P&gt;&lt;P&gt;If its 01, u vl get the differrnce in years, &lt;/P&gt;&lt;P&gt;02  - Months&lt;/P&gt;&lt;P&gt;03 - days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this hint may help u.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sujatha.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 09:28:51 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-the-date/m-p/2072468#M429403</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-21T09:28:51Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with the date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-the-date/m-p/2072469#M429404</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Viven,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;  Hope u understood my answer , You have given the length of CDAYS as 5 , thats why it is not giving the correct number , increase the length to 7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA : CDAYS(7) TYPE N.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So you will get CDAYS as 732757 / 365  =  2007  Years till now which is true&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Mar 2007 09:31:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/issue-with-the-date/m-p/2072469#M429404</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-03-21T09:31:03Z</dc:date>
    </item>
  </channel>
</rss>

