cancel
Showing results for 
Search instead for 
Did you mean: 

Calculation in terms of Months

Former Member
0 Kudos

Hi,

What can be the expression for calculating the difference of dates in terms of months.

For eg:

I want to calculate experience of an employee in months.System date-Date of joining

Regards

Nisha

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

It should be either

(Date1-Date2)/30

or for more accurate results:

MID(Date1,6,2)-MID(Date2,6,2) +MID(Date1,1,4)12 - MID(Date2,1,4)12.

You can not ignore the year value when months needed to be calculated.

Regards,

Edna

Former Member
0 Kudos

Hi Nisha,

Update thread with solution which solved ur Problem

Thanks,

Maheshwari

Former Member
0 Kudos

Hi,

Solution is as:

SYSTIME(0) - DOJ/30.

Regards

Nisha

Former Member
0 Kudos

Hi,

If ur Date field is of type Literal Date & date format is YYYY.MM.DD then try this:

MID(SYSTIME(0),6,2) u2013 MID(Hire Date,6,2)

Also for better understanding of assignments on Dates go thr this:

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b025fab3-b3e9-2910-d999-a27b7a07...

Thanks,

Maheshwari