Calculate Chronological Age ex: 10 yrs, 4 mo, 2 days

S

Sync-opy

Currently, the function I have in the 'Age' unbound control of my form is
(thx Fred):
=DateDiff("yyyy",[DOB],Date())-IIf(Format([DOB],"mmdd")>Format(Date(),
"mmdd"),1,0)
This works great for correctly displaying a persons age in years...

....However, I have spent days playing with this and many other posted
functions and codes, and have been unable to accomplish what I am really
looking for.

What I would really like is a way to automatically display a person's
precise Chronological Age in Years, Months and Days.
For example:
If I have a someone's data entered into my [DOB] field as:
05/18/1999
and then given today's current date of:
09/20/2009
I would like to have my the unbound control 'Age' in my form field display
"10 yrs, 4 months, 2 days"

I appreciate any and all help!! Please keep in mind I am relatively new in
the world of Access!

Thanks!

sync-opy
 
F

fredg

Currently, the function I have in the 'Age' unbound control of my form is
(thx Fred):
=DateDiff("yyyy",[DOB],Date())-IIf(Format([DOB],"mmdd")>Format(Date(),
"mmdd"),1,0)
This works great for correctly displaying a persons age in years...

...However, I have spent days playing with this and many other posted
functions and codes, and have been unable to accomplish what I am really
looking for.

What I would really like is a way to automatically display a person's
precise Chronological Age in Years, Months and Days.
For example:
If I have a someone's data entered into my [DOB] field as:
05/18/1999
and then given today's current date of:
09/20/2009
I would like to have my the unbound control 'Age' in my form field display
"10 yrs, 4 months, 2 days"

I appreciate any and all help!! Please keep in mind I am relatively new in
the world of Access!

Thanks!

sync-opy

You asked this exact question just an hour ago and it's been answered
in that previous message thread. Please be patient before re-posting
the same question.
 
T

Tom Lake

What I would really like is a way to automatically display a person's
precise Chronological Age in Years, Months and Days.

One problem with that is: How do you calculate the Months part?
Months aren't a standard length so if you'd say 5 January to
5 February is one month, that's not the same length as 5 February
to 5 March. If you're assuming all months are 30 days or something,
then they're better defined.

Tom Lake
 

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