Hi.. I am writing this query after reading similar posts from this forum because none worked for me.
I have to calculate total tenure of employee - exact years months and days (single extra day matters)
years=Fix(totaldays/365) '(avg. no of days in year)
months=Fix(totaldays/30.4) '( avg no. of days in month)
but such arithmatic go wrong by 2 or 3 days due to the constants used.
for eg. 20/9/2007 to 19/9/2009 is 2 years
but code shows 2 years 2 days.
Is there any other alternative I can use??