Hello everyone,
I have two variables: start_year and end_year. start_year is in recorded in years and in format numeric 8. while end_year is mmddyy10.
i have tried to subtract and get the age but i keep getting funny values even with some of the codes i found.
Attached is the simplest code i tried, your help is highly appreciated.
sample data.
start_date (8.) end_date(mmddyy10.)
2015 01/02/2017
2013 05/07/2014
2018 06/06/2019
data want;
set have;
format end_date year4.;
end_date2 = end_date;
format end_date2 8.;
age = end_date2 - start_date;
run;