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


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


Tips:Calculating Ages

From sasCommunity
Jump to: navigation, search

Because of leap years, it is not possible to accurately calculate a person's colloquial age on a particular date ("Age at Last Birthday") using just simple arithmetic operations. However, SAS date functions can be employed to get a correct result. The formula is

 age = floor((intck('month',birth,somedate) - (day(somedate) < day(birth))) / 12);

....see also