ssraghunathan
New Member
I have the data (dd-mmm-yyyy) wherein i need to calculate no. of months served as upto 31st March 2012 from their joining date.
a) If anybody serve less than a year then calculate actual months
b) If any employee who is more than 18 months, the value restricted to 18 months.
c) In all other cases, it should be 12 months.
Ex. 1
Dt.of joining : 1-apr-2007
No. of Months served : 5 Years as on 31st March 2012
But the calculation is for 12 Months.
Ex. 2
Dt.of joining : 1-oct-2010
No. of Months served : 1 Year 6 months as on 31st March 2012
But the calculation is for 18 Months.
Ex. 3
Dt.of joining : 1-oct-2011
No. of Months served : 6 months as on 31st March 2012
But the calculation is for 6 Months.
Anybody help me.
a) If anybody serve less than a year then calculate actual months
b) If any employee who is more than 18 months, the value restricted to 18 months.
c) In all other cases, it should be 12 months.
Ex. 1
Dt.of joining : 1-apr-2007
No. of Months served : 5 Years as on 31st March 2012
But the calculation is for 12 Months.
Ex. 2
Dt.of joining : 1-oct-2010
No. of Months served : 1 Year 6 months as on 31st March 2012
But the calculation is for 18 Months.
Ex. 3
Dt.of joining : 1-oct-2011
No. of Months served : 6 months as on 31st March 2012
But the calculation is for 6 Months.
Anybody help me.