As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

Your Age In People Years: Not All Formulas Are the Same

From sasCommunity
Jump to: navigation, search


The calculation of an individual’s age can be problematic. SAS® dates are generally measured in terms of days (or seconds if a datetime value is used), so we have to convert the value to years. To some extent, how we calculate age will depend on how we intend to use the value. The society’s concept of ‘age’ is different than the mathematical concept. Age in years is further complicated by the very definition of a year as one rotation of the earth around the sun. This period does not convert to an integer number of days, and it is therefore further complicated by leap years.

Since SAS does not contain an AGE function, we need a formula for the conversion. And there are several to choose from. Which should we use?

Online Materials

View the pdf for calculating age in years.

Contact Info

Please check out my user page. You can also email me.