How can I calculate age with the birthdate?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I went to the MS Office website and the answer provided didn't work. I have
a database that has the birthdate in there and also age. The age is merely
entered in by hand. I would like it to be a calculated value using the date
of birth and the current date. If you can help, I would be much appreciative.
 
I went to the MS Office website and the answer provided didn't work. I have
a database that has the birthdate in there and also age. The age is merely
entered in by hand. I would like it to be a calculated value using the date
of birth and the current date. If you can help, I would be much appreciative.

The age should NOT be stored in the table: you can be absolutely
certain that all ages will be WRONG within a single year!

Instead, calculate it on the fly using a Query. In a vacant Field cell
type

Age: DateDiff("yyyy", [DOB], Date()) - IIF(Format([DOB], "mmdd") >
Format(Date(), "mmdd"), 1, 0)


John W. Vinson[MVP]
(no longer chatting for now)
 
Try this

year(date()) - year(your_field_name)

L.


Matt said:
I went to the MS Office website and the answer provided didn't work. I have
a database that has the birthdate in there and also age. The age is merely
entered in by hand. I would like it to be a calculated value using the date
of birth and the current date. If you can help, I would be much
appreciative.
 
Except that that will give an incorrect result if they haven't yet had their
birthday this year.

See the other answers in this thread for more reliable approaches.
 
Ok, my schema is reduced.
It's true in law-departments where only years are checked
about the age.

Thanks.
L.
 

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

Back
Top