Previous PageNext Page

Calculating a Person's Age

Here are some ways to calculate age with SAS. Which is best?

Age = (Today() - DOB)/365.25;
Age = Round((Today() - DOB)/365.25);
Age = Int((Today() - DOB)/365.25);

How do you calculate your age? Is age reported as the number of complete years since birth? Here is another (and correct) way of calculating age.

Age = Int( (Intck("MONTH", DOB, Today()) - (Day(Today()) < Day(DOB)))/12 );

Work it out. Does this do the trick?

Previous PageTable Of ContentsNext Page