Thread: Calculate age in query (Access 2000)

1. Calculate age in query (Access 2000)

I use Access 2000. In a query I set up a field to calculate the age of an individual using the following expression: Age: DateDiff("y",[Member DOB], Date())/365.25 I received the answer in years but with 10 decimal places. How can I get the answer in simply years?

2. Re: Calculate age in query (Access 2000)

As you don't need the decimals, use Int(DateDiff("y",[Member DOB], Date())/365.25)

3. Re: Calculate age in query (Access 2000)

Actually you should be using "yyyy" as the "Interval" argument in the DateDiff function ... not "y".
The "y" argument returns the "Day of Year".

Here is an expression I always use:

DateDiff("yyyy", DOB, Date) + (Date < DateSerial(Year(Date), Month(DOB), Day(DOB)))

HTH
RDH

4. Re: Calculate age in query (Access 2000)

Francois thanks for the help!

Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•