Find below a sample program that calculates the age in years months and days.
The sample is based on a SAS date value
data ageCalc;
infile cards dlm=",";
input
min_date : date9.
max_date : date9.
;
years = intck('year',min_date,max_date,'c');
months = intck('month',intnx('year',min_date,years,'same'),max_date,'c');
days = intck('day',intnx('month',intnx('year',min_date,years,'same'),months,'same'),max_date,'c');
format min_date max_date ddmmyyp10.;
cards;
10NOV1963,26sep2013
15mar1961,11oct2001
31jan2000,01mar2000
29feb2000,28feb2001
;
proc print data=ageCalc;
run;
... View more