data age(keep=age);
t_day="xxxxxxxxx"d;
d_birth="xxxxxxx'd;
age=intck("year",d_birth,t_day);
run;
ex;
data age(keep=age);
t_day="27dec2017"d;
d_birth="07jun1989"d;
age=intck("year",d_birth,t_day);
run;
@rvsidhu035: The original post you responded to was from 2011. Since 9.3 I think the best way to calculate age is to use the yrdif function (see: http://www.sascommunity.org/wiki/Tips:Calculating_Exact_Age_with_the_YRDIF_Function )
Art, CEO, AnalystFinder.com
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Need courses to help you with SAS Life Sciences Analytics Framework, SAS Health Cohort Builder, or other topics? Check out the Health and Life Sciences learning path for all of the offerings.