Change birth date into age

matthewR
5StarLounger
Posts: 627
Joined: 03 Feb 2010, 15:02

Change birth date into age

Post by matthewR »

I have a query with birth date that I would like to change into the age of the person. What would the calculation be?

User avatar
HansV
Administrator
Posts: 78487
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Change birth date into age

Post by HansV »

A simple calculated column:

Age: Int((Date()-[DOB])/365.25)

where DOB is the name of the date-of-birth field.
Best wishes,
Hans

User avatar
HansV
Administrator
Posts: 78487
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Change birth date into age

Post by HansV »

The simple formula from my first reply is usually accurate, but it can be off by 1 year in some circumstances. For a fully accurate calculation, use:

Age: Year(Date())-Year([DOB])+(Month(Date())<Month([DOB]) Or Month(Date())=Month([DOB]) And Day(Date())<Day([DOB]))

where DOB again is the name date-of-birth field.
Best wishes,
Hans