Originally Posted by
rpeare
...=Datediff("yyyy", [birthdate], date())...
Done like this, DateDiff() is simply subtracting the year of birth from the current year! The answer will only be correct if the person has already had their birthday for the current year!
Here are three Formulas commonly used for an accurate calculation of age:
Code:
DateDiff("yyyy", [DOB], Date) - IIf(Format$(Date, "mmdd") < Format$([ DOB], "mmdd"), 1, 0)
Code:
DateDiff("yyyy", [DOB], Date()) + Int( Format(Date(), "mmdd") < Format( [DOB], "mmdd") )
Code:
DateDiff("m", Me.DOB, Date()) \ 12
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007