<?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: difference in date in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-in-date/m-p/1965747#M396652</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to find out the difference between two dates than you have to find out wheather you want to check the whole date formate or only some part of the date,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;than you have to split the contents of the both the date and than check them .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Feb 2007 13:00:36 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2007-02-15T13:00:36Z</dc:date>
    <item>
      <title>difference in date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-in-date/m-p/1965744#M396649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;How to find the difference between two dates.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 12:42:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-in-date/m-p/1965744#M396649</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T12:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: difference in date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-in-date/m-p/1965745#M396650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: RESULT TYPE I.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;RESULT = DATE1 - DATE2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE: RESULT.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vasanth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 12:43:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-in-date/m-p/1965745#M396650</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T12:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: difference in date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-in-date/m-p/1965746#M396651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;data : date1 type sy-datum,
         date1 type sy-datum,
         date1 type sy-datum.
 

 date = date1 - date2&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 12:44:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-in-date/m-p/1965746#M396651</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T12:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: difference in date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-in-date/m-p/1965747#M396652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you want to find out the difference between two dates than you have to find out wheather you want to check the whole date formate or only some part of the date,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;than you have to split the contents of the both the date and than check them .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;mrutyun^&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 13:00:36 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-in-date/m-p/1965747#M396652</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T13:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: difference in date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-in-date/m-p/1965748#M396653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE&gt;&lt;CODE&gt;CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES' 
EXPORTING 
I_DATUM_BIS = x_faede-zfbdt 
I_DATUM_VON = p_fdat 
I_KZ_EXCL_VON = '0' 
I_KZ_INCL_BIS = '0' 
I_KZ_ULT_BIS = ' ' 
I_KZ_ULT_VON = ' ' 
I_STGMETH = '0' 
I_SZBMETH = '1' 
IMPORTING 
E_TAGE = dias_v. 
IF SY-SUBRC &amp;lt;&amp;gt; 0. 
ENDIF. 

donde: 

x_faede-zfbdt -&amp;gt; 20050915 
p_fdat -&amp;gt; 20050811&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;b&amp;gt;For years and months betwwwn two days:&amp;lt;/b&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;
DATA:   EYEARS  LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE PREL-BEGDA,
                 TODATE   LIKE PREL-BEGDA DEFAULT SY-DATUM.

CALL FUNCTION 'COMPUTE_YEARS_BETWEEN_DATES'
  EXPORTING
    first_date                        = fromdate
*   MODIFY_INTERVAL                   = ' '
    second_date                       = todate
 IMPORTING
   YEARS_BETWEEN_DATES               =  EYEARS
* EXCEPTIONS
*   SEQUENCE_OF_DATES_NOT_VALID       = 1
*   OTHERS                            = 2
          .
IF sy-subrc &amp;lt;&amp;gt; 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Write:/ eyears.


DATA:       EMONTHS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE SY-DATUM,
            TODATE   LIKE SY-DATUM
 DEFAULT SY-DATUM.

CALL FUNCTION 'MONTHS_BETWEEN_TWO_DATES'
  EXPORTING
    i_datum_bis         = fromdate
    i_datum_von         = todate
*   I_KZ_INCL_BIS       = ' '
 IMPORTING
   E_MONATE            = emonths
          .
write:/ emonths
 
*&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this and let me know.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 13:04:53 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-in-date/m-p/1965748#M396653</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T13:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: difference in date</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/difference-in-date/m-p/1965749#M396654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;REPORT ZDATEDIFF.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATA: EDAYS LIKE VTBBEWE-ATAGE,&lt;/P&gt;&lt;P&gt;EMONTHS LIKE VTBBEWE-ATAGE,&lt;/P&gt;&lt;P&gt;EYEARS LIKE VTBBEWE-ATAGE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,&lt;/P&gt;&lt;P&gt;TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'&lt;/P&gt;&lt;P&gt;exporting&lt;/P&gt;&lt;P&gt;i_date_from = FROMDATE&lt;/P&gt;&lt;P&gt;i_date_to = TODATE&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;I_FLG_SEPARATE = ' '&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IMPORTING&lt;/P&gt;&lt;P&gt;E_DAYS = EDAYS&lt;/P&gt;&lt;P&gt;E_MONTHS = EMONTHS&lt;/P&gt;&lt;P&gt;E_YEARS = EYEARS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WRITE:/ 'Difference in Days ', EDAYS.&lt;/P&gt;&lt;P&gt;WRITE:/ 'Difference in Months ', EMONTHS.&lt;/P&gt;&lt;P&gt;WRITE:/ 'Difference in Years ', EYEARS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;INITIALIZATION.&lt;/P&gt;&lt;P&gt;FROMDATE = SY-DATUM - 60.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Feb 2007 13:09:04 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/difference-in-date/m-p/1965749#M396654</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2007-02-15T13:09:04Z</dc:date>
    </item>
  </channel>
</rss>

