I have a date of birth field and I would like to have a formula field that calculates the student's age based on the date in that field.
 10 Points
Posted 6 years ago
dwhawe, Champion
 742 Points
(ToNumber(ToText(Today()[Date of Birth])))/8766
I am sure there is a better way but this is what I use to calculate current age as of today
I am sure there is a better way but this is what I use to calculate current age as of today
dwhawe, Champion
 742 Points
 0 Points
Is there a way to display the age as a whole number? I set the field to display 0 decimal places but once a person is halfway through the year it rounds up rather than down. Any suggestions?
 0 Points
I added the "Floor" to round it down to the nearest integer. I also added 24 hours to the amount of time being divided by 8766 so that it will increase the age on the person's birthday, rather than the day after. (it is very important to place the "24" between the correct parenthesis).
Floor((ToNumber(ToText(Today()[Date of Birth]))+24)/8766 )
Floor((ToNumber(ToText(Today()[Date of Birth]))+24)/8766 )
 110 Points
This is 100% accurate in perpetuity:
If(Today()>ToDate(ToText(Month([Birthdate]))&""&ToText(Day([Birthdate]))&""&ToText(Year(Today()))),
Year(Today())Year([Birthdate]),(Year(Today())(Year([Birthdate])))1
)
If(Today()>ToDate(ToText(Month([Birthdate]))&""&ToText(Day([Birthdate]))&""&ToText(Year(Today()))),
Year(Today())Year([Birthdate]),(Year(Today())(Year([Birthdate])))1
)
Ⲇanom the ultimate (Dan Diebolt), Champion
 29,904 Points
This does not account for leap seconds. Yes it is a real thing and the last leap second occurred on June 30, 2015 at 23:59:60!
 110 Points
It would appear that this formula is actually more accurate and much simpler. Thanks Matthew @ CirrusOps!
(Year(Today())Year([Birthdate])1)+
If(Month(Today())>Month([Birthdate]),1,0)+
If(Month(Today())=Month([Birthdate]) and Day(Today())>=Day([Birthdate]),1,0)
(Year(Today())Year([Birthdate])1)+
If(Month(Today())>Month([Birthdate]),1,0)+
If(Month(Today())=Month([Birthdate]) and Day(Today())>=Day([Birthdate]),1,0)
Related Categories

Formulas & functions
 2881 Conversations
 71 Followers

Tables & fields
 7159 Conversations
 170 Followers