# Thread: Work out age in YRS and Mnths (Access 2000>)

1. ## Work out age in YRS and Mnths (Access 2000>)

I would like to display the age of a person in YRS and MNTHS within a calculated field in a query. The field value must show eg. 24YR 8MNTH. How do you do this!
TIA

2. ## Re: Work out age in YRS and Mnths (Access 2000>)

See for example <post:=461,962>post 461,962</post:> and <post:=237,840>post 237,840</post:>. If you search this forum for age years months you'll find more.

3. ## Re: Work out age in YRS and Mnths (Access 2000>)

Try this expression (where <!t>[dob]<!/t> is your date of birth field):

Int((Date()-[dob])/365.25) & "YR " & Int(((Date()-[dob]) Mod 365.25)/30) & "MNTH"

4. ## Re: Work out age in YRS and Mnths (Access 2000>)

Tx for replies, its great. I feel quite silly, as I was so frustrated with this that I reverted to the forum and immediately posted a Q. It didn't even occur to me to search until 10min after the post! When I did, I found 4 threads dealing with this!
I apologise...I reacted to the situation without thinking!

5. ## Re: Work out age in YRS and Mnths (Access 2000>)

No worries. In hindsight, scrap my earlier reply as the following is far more elegant:

Format(Date()-[dob],"yy""YR ""m""MTH""")

Tx Waggers

7. ## Re: Work out age in YRS and Mnths (Access 2000>)

That will return the correct age in most, but unfortunately not all situations. For example, if DOB = 23-November-2005 and Date() = 24-November-2005, the result is 99YR 12MTH. I'm afraid you do need one of the more complicated formulas.

8. ## Re: Work out age in YRS and Mnths (Access 2000>)

This is elegant, but it does not give the right answers.

Today (24 Nov 2005) if I put in birth date of 22 Nov 1951 it gives an age of 54 yrs and 1 month rather than 54 Yrs 0 months.

If I put in a birth date of 25 Nov 1951 it gives 53 yrs and 12 months.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•