Calculating age in a query

  • Thread starter Thread starter Ann Marie Bette
  • Start date Start date
A

Ann Marie Bette

Hi,
I was wondering if someone can show me how to calculate
age based on birthdate?

I created a calculated field in my query design window
that reads:

Age: DatePart('yyyy',Now())-DatePart('yyyy',[birthday])

The problem is this computes the age based on the "year"
and doesn't look at the actual birth month to give you
the "exact" age of the person.

I appreciate any help I can get with this.
Sincerely,
Ann Marie Bette
 
Ann Marie,

Age:
DateDiff("yyyy",[birthdate],Date())+(Format([birthdate],"mmdd")>Format(Date(),"mmdd"))

- Steve Schapel, Microsoft Access MVP
 
Back
Top