Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

diff b/w two dates

Former Member
0 Likes
532

HI,

what is function module to find the difference between two dates

could anybody help me please.

thanks

sathish

4 REPLIES 4
Read only

Former Member
0 Likes
499

Hi,

HR_SGPBS_YRS_MTHS_DAYS

Edited by: Jose on Mar 4, 2008 6:59 AM

Read only

Former Member
0 Likes
499

Try using the FM "FIMA_DAYS_BETWEEN_TWO_DATES_2".

or

Use this FM


data: No_of_days TYPE I
CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
EXPORTING
I_DATUM_BIS = G_T_PURO-AEDAT " Enddate
I_DATUM_VON = G_T_EBAN-BADAT " Start Date
IMPORTING
E_TAGE = No_of_days 
EXCEPTIONS
DAYS_METHOD_NOT_DEFINED = 1
OTHERS = 2.
write: No_of_days .

TO find out the difference in the form of months try


MONTHS_BETWEEN_TWO_DATES 
MONTHS_BETWEEN_TWO_DATES_NEW
HR_99S_MONTHS_BETWEEN_DATES
HR_MONTHS_BETWEEN_TWO_DATES

Regards,

Chandru

Read only

Former Member
0 Likes
499

HI

SD_DATETIME_DIFFERENCE..try this

Read only

Former Member
0 Likes
499

hi,

SD_DATETIME_DIFFERENCE Give the difference in Days and Time for 2 dates

it gives days difference as well as time difference