<te********@hotmail.comwrote
Read up on DateDiff.
To get the age of the employee in years at the date of hire :
SELECT DateDiff("yyyy", DOB, Hired) as StartAge
FROM Table1;
Read up on DateDiff.
From the immediate window:
? DateDiff("y",#12/31/2000#,#01/01/2001#)
1
By normal reckoning, a baby born on the 31st of December is not one year old
the next day.
? DateDiff("yyyy",#12/31/2000#,#01/01/2007#)
7
According to most cultures, a person born the 31st of December 2000 will not
be 7 years old until the 31st of December 2007.
Yes, there are cultures in which the child is considered age 1 at the moment
of birth. Is your culture one of those? But, in any case, the simplistic
calculation you show is not accurate for that view either.
There is a Knowledge Base article on calculating age at
http://support.microsoft.com/kb/100136/en-us which takes the date within the
year into account.