Application Development 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: 

FM to calculate No. of Days between a date range

Former Member
0 Kudos

Dear Experts,

Is there a FM to calculate No. of Days between a date range?

Thanks for the help.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

FM : HR_HK_DIFF_BT_2_DATES--> (for parameter OUTPUT_FORMAT pass 02 ..)

DAYS_BETWEEN_TWO_DATES

C14B_DIFF_BT_2_DATES

Even you can use the function module "FIMA_DAYS_AND_MONTHS_AND_YEARS" to get the difference between days, months and years.

4 REPLIES 4

Former Member
0 Kudos

FM : HR_HK_DIFF_BT_2_DATES--> (for parameter OUTPUT_FORMAT pass 02 ..)

DAYS_BETWEEN_TWO_DATES

C14B_DIFF_BT_2_DATES

Even you can use the function module "FIMA_DAYS_AND_MONTHS_AND_YEARS" to get the difference between days, months and years.

Former Member
0 Kudos

Hi,

Try with these FM's:

1. C14B_DIFF_BT_2_DATES

2. DAYS_BETWEEN_TWO_DATES

Hope it helps u..

Regards,

KK

Former Member
0 Kudos

CALL FUNCTION 'FIMA_DAYS_AND_MONTHS_AND_YEARS'

EXPORTING

I_DATE_FROM = '19991008'

I_DATE_TO = '20000116'

IMPORTING

E_DAYS = t_days

E_MONTHS = t_months

E_YEARS = t_years.

results:

t_days = 466 t_months = 16 t_years = 2

Hope this will be helpful.

Kieat.

0 Kudos

Thanks All.