04-05-2006 10:25 AM
Hi
I need to calculate the amount of days that are between two dates, how can I do that?
Thanks,
Nana
04-05-2006 10:27 AM
Hi Nana,
You can define a variable of type I and just subtract both dates.
regards,
John.
04-05-2006 10:27 AM
Hi Nana,
You can define a variable of type I and just subtract both dates.
regards,
John.
04-05-2006 10:27 AM
Nana,
days = date2 - date1.
Regards,
Ravi
Note : Please mark the helpful answers
04-05-2006 10:27 AM
04-05-2006 10:27 AM
04-05-2006 10:29 AM
04-05-2006 10:27 AM
Hi,
just subtract one date from other.
Hope it helps.
regards,
Shashank
04-05-2006 10:31 AM
Hi,
there is no need of any FM for this, just substract it .
Data: datehigh type sy-datum,
datelow type sy-datum.
data: diff type i.
datehigh = sy-datum.
datelow = sy-datum - 100.
diff = datehigh - datelow.
write: diff.
Regards
vijay
04-05-2006 10:31 AM
04-05-2006 10:52 AM
Hi,
take two variables of date type and with edit mask, remove the slashes in the two variables, subtract them and move to another varible of integer type.
hope it could help you.
regards
-Rakesh
04-05-2006 11:17 AM
04-05-2006 11:19 AM
11-18-2008 11:32 AM
DATA: date1 LIKE sy-datum.
data: DAYS1 TYPE I.
LOOP AT IT_KNA1 INTO WA_KNA1.
DATE1 = WA_KNA1-WADAT_IST.
CALL FUNCTION 'HR_99S_INTERVAL_BETWEEN_DATES'
EXPORTING
BEGDA = DATE1
endda = sy-datum
IMPORTING
DAYS = DAYS1.
WA_KNA1-DAYS1 = DAYS1.
MODIFY IT_KNA1 FROM WA_KNA1 TRANSPORTING DAYS1.
CLEAR WA_KNA1.
ENDLOOP.