Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9076

Re: There are 2 dates both in character format like : '10.09.2010' and '01.04.2015' . I want to find the difference between two dates in terms of number of years , months and days.

$
0
0

REPORT ZDATEDIFF.

 

DATA: EDAYS   LIKE VTBBEWE-ATAGE,

       EMONTHS LIKE VTBBEWE-ATAGE,

       EYEARS  LIKE VTBBEWE-ATAGE.

 

PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,

             TODATE   LIKE VTBBEWE-DBERBIS .

 

call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'

   exporting

     i_date_from          = FROMDATE

     i_date_to            = TODATE

*   I_FLG_SEPARATE       = ' '

   IMPORTING

     E_DAYS               = EDAYS

     E_MONTHS             = EMONTHS

     E_YEARS              = EYEARS.

 

WRITE:/ 'Difference in Days   ', EDAYS.

WRITE:/ 'Difference in Months ', EMONTHS.

WRITE:/ 'Difference in Years  ', EYEARS


Viewing all articles
Browse latest Browse all 9076

Trending Articles