A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

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



 
 
Thread Tools Display Modes
  #1  
Old September 21st, 2009, 12:48 AM posted to microsoft.public.access.forms
Sync-opy
external usenet poster
 
Posts: 10
Default Calculate Chronological Age ex: 10 yrs, 4 mo, 2 days

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
  #2  
Old September 21st, 2009, 03:20 AM posted to microsoft.public.access.forms
fredg
external usenet poster
 
Posts: 4,386
Default Calculate Chronological Age ex: 10 yrs, 4 mo, 2 days

On Sun, 20 Sep 2009 16:48:01 -0700, Sync-opy wrote:

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.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #3  
Old September 21st, 2009, 02:27 PM posted to microsoft.public.access.forms
Tom Lake[_2_]
external usenet poster
 
Posts: 96
Default Calculate Chronological Age ex: 10 yrs, 4 mo, 2 days

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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:11 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.