Calculating Age

M

Mark M Simonian

I am sure that this formula gets requested many times and I found this below
through Google but I get whole numbers and prefer to see a value to tenths
like 1.5. I am using Access 2002 Today's Date is Date and Birthdate is Bday

The following formula works but how to I see the number in the tenths too?
This is in the control source of an unbound text box:
=DateDiff("yyyy",[Bday],Date())+int(Format(Date(),"mmdd")<Format([Bday],"mmd
d"))
-----------------------------------------------------
Mark M Simonian MD
Medical Director, ChildNet Medical Assoc.
681 Medical Center Drive West #106
Clovis, CA 93611
(559) 325-6850
(e-mail address removed)
****************************************
Alert: This email and any files transmitted with it
are intended solely for the use of the individual or
entity to whom they are addressed and may contain
confidential, patient health or other legally
privileged information. If you have received this
email in error please notify the sender by email,
delete and destroy this message and its attachments.
Any unauthorized review, use, disclosure,
or distribution is prohibited.
 
M

Mark M Simonian

Wonderful. It works great!

-----------------------------------------------------
Mark M Simonian MD
Medical Director, ChildNet Medical Assoc.
681 Medical Center Drive West #106
Clovis, CA 93611
(559) 325-6850
(e-mail address removed)
****************************************
Alert: This email and any files transmitted with it
are intended solely for the use of the individual or
entity to whom they are addressed and may contain
confidential, patient health or other legally
privileged information. If you have received this
email in error please notify the sender by email,
delete and destroy this message and its attachments.
Any unauthorized review, use, disclosure,
or distribution is prohibited.

Allen Browne said:
For an approximation to the nearest tenth:
=Round(DateDiff("d", [Bday], Date()) / 365.25, 1)
but be aware that this will show a person as a certain age slightly before
they reach that age.

For a function that returns years, months, and days, see:
http://members.rogers.com/douglas.j.steele/Diff2Dates.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Mark M Simonian said:
I am sure that this formula gets requested many times and I found this below
through Google but I get whole numbers and prefer to see a value to tenths
like 1.5. I am using Access 2002 Today's Date is Date and Birthdate is Bday

The following formula works but how to I see the number in the tenths too?
This is in the control source of an unbound text box:
=DateDiff("yyyy",[Bday],Date())+int(Format(Date(),"mmdd")<Format([Bday],"mmd
 

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