Hello,
We are looking for a VBA function to calculate the exact difference in years between 2 dates. The problem at hand is to calculate the years of service of a employee with a company, which is the year difference between now and hire date.
DateDiff will not do, since it returns a long integer.
For example,
datediff("yyyy",cdate("2-10-2006"),cdate("31-10-2007"))
Returns 1, but is actually 1.03.
Is there a way to get this?
Thank you
Chris Lambrou
We are looking for a VBA function to calculate the exact difference in years between 2 dates. The problem at hand is to calculate the years of service of a employee with a company, which is the year difference between now and hire date.
DateDiff will not do, since it returns a long integer.
For example,
datediff("yyyy",cdate("2-10-2006"),cdate("31-10-2007"))
Returns 1, but is actually 1.03.
Is there a way to get this?
Thank you
Chris Lambrou