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

months between two dates.

Former Member
0 Likes
16,550

i want to hav, how many months are there b/w two dates. m using ,,

months_between_dates fn. but the problem is if i give two dates as

22.06.2007 and 05.07.2007. it gives me 1 month but it is actually not complete month. i want to hav accurate difference like 0.77. which fn should i use....

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
5,941

Hi

There is no such exact fun module

first get the days between dates and divide those days by 30 (depending on month), which gives exact value.

Reward points for useful Answers

Regards

Anji

4 REPLIES 4
Read only

Former Member
0 Likes
5,941

Hi,

'FIMA_DAYS_AND_MONTHS_AND_YEARS'

FM CSCP_PARA1_GET_PERIODS.

MONTHS_BETWEEN_TWO_DATES

MONTHS_BETWEEN_TWO_DATES_NEW

HR_99S_MONTHS_BETWEEN_DATES

HR_MONTHS_BETWEEN_TWO_DATES

<b>Rewrad points</b>

Regards

Read only

Former Member
0 Likes
5,942

Hi

There is no such exact fun module

first get the days between dates and divide those days by 30 (depending on month), which gives exact value.

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
5,941

Hi,

I dont think we can get the FM for your requirment but use this FM HR_ECM_GET_PERIOD_BETW_DATES and deduct the no of days by 30 to get the month

Regards

Shiva

Read only

Former Member
0 Likes
5,941

Hi,

can you explane the result 0.77.

What shell be calculate?

(30 - 22 + 5) / 30 -> days in june

or

(30 - 22 + 5) / 31 -> days in july

Regards, Dieter