04-12-2006 10:59 AM
Hi,
I need to know what is the function module that is used to find the difference between two dates.
Regards,
Clara
04-12-2006 11:06 AM
Hi clara/cheli!
Use Function module SD_DATETIME_DIFFERENCE to get the result.
G.Prasanna Kumar
reward points if helpful
Message was edited by: Praneeth kumar
04-12-2006 11:03 AM
REPORT ZDATEDIFF.
DATA: EDAYS LIKE VTBBEWE-ATAGE,
EMONTHS LIKE VTBBEWE-ATAGE,
EYEARS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
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.
INITIALIZATION.
FROMDATE = SY-DATUM - 60.
04-12-2006 11:06 AM
Hi clara/cheli!
Use Function module SD_DATETIME_DIFFERENCE to get the result.
G.Prasanna Kumar
reward points if helpful
Message was edited by: Praneeth kumar
04-12-2006 11:06 AM
hi ,
try these fms..
SD_DATETIME_DIFFERENCE
DAYS_BETWEEN_TWO_DATES
MONTHS_BETWEEN_TWO_DATES..
<b>reward if useful..</b>
04-12-2006 11:06 AM
04-12-2006 11:10 AM
hi Clara,
why do you need FM for that..
data: date1 type sy-datum,
date2 type sy-datum.
data: diff type i.
diff = date1 - date2.
Regards
vijay
04-12-2006 11:34 AM
Hi,
SD_DATETIME_DIFFERENCE- to find the difference between two dates.
Regards,
Varma