‎2008 Mar 12 7:16 AM
Hi friends,
can any one tell me what is the function module for calculating dates ie. difference between 2 dates.
cheers
‎2008 Mar 12 7:18 AM
CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
EXPORTING
date1 = lv_date1
date2 = lv_date2
output_format = '02'
IMPORTING
days = lv_days.
regards,
Srinivas
‎2008 Mar 12 7:18 AM
CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
EXPORTING
date1 = lv_date1
date2 = lv_date2
output_format = '02'
IMPORTING
days = lv_days.
regards,
Srinivas
‎2008 Mar 12 7:19 AM
Hi ,
The below function module is useful for ur requirement.Check it once.
CALL FUNCTION 'HR_SGPBS_YRS_MTHS_DAYS' " find the difference between review date and current date.
EXPORTING
beg_da = sy-datum
end_da = v_review_date
IMPORTING
no_day = v_diff_days
no_month = v_diff_months
no_year = v_diff_year
.
Regards
‎2008 Mar 12 7:20 AM
Please check if
DAYS_BETWEEN_TWO_DATES is helpful to your case.
Thanks
‎2008 Mar 12 7:20 AM
‎2008 Mar 12 7:20 AM
For calculating differnce between dates
U can simply use.
l_date = dateto - datefrom.l_date will give u the difference.
‎2008 Mar 12 7:21 AM
Hi,
YOu can use FMs
DAYS_BETWEEN_TWO_DATES
MONTHS_BETWEEN_TWO_DATES
Thanks,
Sriram Ponna,
‎2008 Mar 12 7:23 AM
Difference b/w 2 dates can be achieved by FM
/SDF/CMO_DATETIME_DIFFERENCE
also check FM
HR_99S_INTERVAL_BETWEEN_DATES
Hope this helps.
Regards
Vinayak