# Discussions

View Only

## Age today

• #### 1.  Age today

Posted 7 days ago
I for the life of me can't figure out the formula to calculate today's age based on a simple date field called DOB. Help!

------------------------------
Mike McCartney
------------------------------

• #### 2.  RE: Age today

Posted 7 days ago
Mike,

The simplest answer is a  Formula Duration field

Today()-[DOB]

However, you need very young people because it will display their age in Days when you have smart units set.

What are you using the information for?  Do you need it in another calculation?  If so then this is fine.

If you are going to show it to a User to make a decision on then change to a Formula Rich Text
This will show whole years.

var number Age =ToDays(Today()-[DOB]);
var number AgeYears = Round((\$Age)/365);
ToText(\$AgeYears)

------------------------------
Don Larson
Paasporter
Westlake OH
------------------------------

• #### 3.  RE: Age today

Posted 7 days ago
This numeric formula field will give you the exact age in integer years.

 var date DOB = [DOB];Year(Today())-Year(\$DOB)-If(Month(Today())

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
http://QuickBaseCoach.com
mark.shnier@gmail.com
------------------------------

• #### 4.  RE: Age today

Posted 6 days ago
Thanks. Worked well.

------------------------------
Mike McCartney
------------------------------