<?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 conversion to key figure format in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-to-key-figure-format/m-p/7958674#M1602535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We know that Excel manages dates as serial numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means that: integer 1 is January 01/01/1900 and integer 2,958,465 is December 31/12/9999. This serial number system (1 to 2,958,465) is referred as Excel Date-Time Code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: dat TYPE sy-datum.&lt;/P&gt;&lt;P&gt;DATA: cnumlow TYPE i,&lt;/P&gt;&lt;P&gt;            datlow TYPE sy-datum VALUE '18991230'.  "I think you get 2 days too much with this conversion, i.e. the epoch date would have to be moved back to DateTime(1899, 12, 30). This is due to Excel's leap year bug I assume&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dat = '20090505'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write dat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cnumlow = dat - datlow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write cnumlow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should see serial number value of 05/05/2009 in cnumlow that is 39938..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope to help, bye!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Jun 2011 17:32:05 GMT</pubDate>
    <dc:creator>roberto_vacca2</dc:creator>
    <dc:date>2011-06-22T17:32:05Z</dc:date>
    <item>
      <title>Date conversion to key figure format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-to-key-figure-format/m-p/7958671#M1602532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am looking at a sample code that converts a date into a number format ( that is generally achieved by using the DATE() formula in excel ). For example '12/2/2011' would be '40879'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How could we achieve this ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Snehith&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2011 15:12:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-to-key-figure-format/m-p/7958671#M1602532</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-22T15:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion to key figure format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-to-key-figure-format/m-p/7958672#M1602533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Snehith,&lt;/P&gt;&lt;P&gt;Excel computes the days elapsed from January 1st, 1900.&lt;/P&gt;&lt;P&gt;So you could just use function module ISB_DAYS_BETWEEN_TWO_DATES with IP_DATE_FROM = '01.01.1900'.&lt;/P&gt;&lt;P&gt;I hope this helps. Kind regards,&lt;/P&gt;&lt;P&gt;Alvaro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2011 16:09:57 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-to-key-figure-format/m-p/7958672#M1602533</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-22T16:09:57Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion to key figure format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-to-key-figure-format/m-p/7958673#M1602534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Alvaro Vidal-Abarca ,&lt;/P&gt;&lt;P&gt;                                         Can you explan what parameter that we need to pass  for the field "IP_SZBMETH".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not getting proper results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Greetson&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2011 16:17:45 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-to-key-figure-format/m-p/7958673#M1602534</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-22T16:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion to key figure format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-to-key-figure-format/m-p/7958674#M1602535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We know that Excel manages dates as serial numbers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This means that: integer 1 is January 01/01/1900 and integer 2,958,465 is December 31/12/9999. This serial number system (1 to 2,958,465) is referred as Excel Date-Time Code...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: dat TYPE sy-datum.&lt;/P&gt;&lt;P&gt;DATA: cnumlow TYPE i,&lt;/P&gt;&lt;P&gt;            datlow TYPE sy-datum VALUE '18991230'.  "I think you get 2 days too much with this conversion, i.e. the epoch date would have to be moved back to DateTime(1899, 12, 30). This is due to Excel's leap year bug I assume&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dat = '20090505'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write dat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cnumlow = dat - datlow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;write cnumlow.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You should see serial number value of 05/05/2009 in cnumlow that is 39938..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope to help, bye!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jun 2011 17:32:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-to-key-figure-format/m-p/7958674#M1602535</guid>
      <dc:creator>roberto_vacca2</dc:creator>
      <dc:date>2011-06-22T17:32:05Z</dc:date>
    </item>
    <item>
      <title>Re: Date conversion to key figure format</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-to-key-figure-format/m-p/7958675#M1602536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Greetson,&lt;/P&gt;&lt;P&gt;you may populate IP_SZBMETH = '0'.&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Alvaro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2011 07:15:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/date-conversion-to-key-figure-format/m-p/7958675#M1602536</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2011-06-23T07:15:36Z</dc:date>
    </item>
  </channel>
</rss>

