# What would be the formula to show the age of a person as of today? I need the result in years

Topic Labels: Formulas
20756 24
cancel
Showing results for
Search instead for
Did you mean:
4 - Data Explorer

DATETIME_DIFF([date1], [date2], ‘units’)

I saw this formula but how do I modify it to include my fields and a result in years for the units?

24 Replies 24
7 - App Architect

Here’s my age formula: DATETIME_DIFF(TODAY(), Birthday, ‘years’)

I have a field named “Birthday” in my table that contains the birthdate.

7 - App Architect

I use Tim’s method, understanding you get an “ERROR” if the birthday field is not filled in.

4 - Data Explorer

What do I do If I need my output to be years and months?

Airtable Employee

To get the age of a person in months:
`DATETIME_DIFF(TODAY(), Birthday, 'months')`
-> 346

Modifying the above to always give you the remainder when dividing by years, using MOD:
`MOD(DATETIME_DIFF(TODAY(), Birthday, 'months'), 12)`
-> 10

Finally, concatenating that with the age in years and adding units:
`DATETIME_DIFF(TODAY(), Birthday, 'years') & ' years, ' & MOD(DATETIME_DIFF(TODAY(), Birthday, 'months'), 12) & ' months'`
-> 28 years, 10 months

5 - Automation Enthusiast

For the formula to work for me, I needed to make: , Birthday, => ,{Birthday},

Thanks for the help.

4 - Data Explorer

Trying to use your DATETIME_DIFF(TODAY(), Birthday, ‘years’)

Still getting that error!! Please help!

4 - Data Explorer

Please send me the entire code formula! Thanks.

5 - Automation Enthusiast

DATETIME_DIFF(TODAY(), {Birthday}, ‘years’)

And {Birthday} is a field in my table, of course.

Hope that works for you.

4 - Data Explorer

Still giving the formula error!