HELP ME PLEASE

H

Holly

Hi All

How do I calculate a person Age using their date of birth
within the same table so that I do not have to run a
query to work it out.

and where would I put the code for this????

Thanks

Holly
 
H

holly

-----Original Message-----
Hi All

How do I calculate a person Age using their date of birth
within the same table so that I do not have to run a
query to work it out.

and where would I put the code for this????

Thanks

Holly
.

OK So I have just read another query saying not to do
this but how do I do this in a Query?
 
C

Cheryl Fischer

Holly,

To calculate an age in a query, just copy all of the following into the
first row of an empty column in your query's design view:

Age:
DateDiff("yyyy",[BirthDate],Now())+Int(Format(Now(),"mmdd")<Format([BirthDat
e],"mmdd"))

This particular expression came from the Access Web, where you can find a
couple of additional ways to calculate age:

http://www.mvps.org/access/datetime/date0001.htm


hth,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top