Change birth date into age
-
- 5StarLounger
- Posts: 627
- Joined: 03 Feb 2010, 15:02
Change birth date into age
I have a query with birth date that I would like to change into the age of the person. What would the calculation be?
-
- Administrator
- Posts: 78595
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Change birth date into age
A simple calculated column:
Age: Int((Date()-[DOB])/365.25)
where DOB is the name of the date-of-birth field.
Age: Int((Date()-[DOB])/365.25)
where DOB is the name of the date-of-birth field.
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 78595
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Change birth date into age
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.
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
Hans