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. |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|