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
Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.
Explore Now →
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.