Rounding ages to nearest tenth

D

Deb_B

I am trying to get my database for my field hockey team to figure the players
age by entering their brithdate. I can get it to round to the nearest tenth
but if I tell it no decimals, it rounds to the nearest whole number. I just
want it to drop the decimal places. If the player is 4 days shy of their 13th
birthday, they are still 12. Can anyone help me with this?

Thanks for your help,

Deb
 
J

John W. Vinson

I am trying to get my database for my field hockey team to figure the players
age by entering their brithdate. I can get it to round to the nearest tenth
but if I tell it no decimals, it rounds to the nearest whole number. I just
want it to drop the decimal places. If the player is 4 days shy of their 13th
birthday, they are still 12. Can anyone help me with this?

Thanks for your help,

Deb

Try:

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

to calculate the age as of the previous birthdate.
 

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