Hi there,
I have a data set with date of birth in the format date9. I would like to create a var Age using an end date as 31DEC2020 but I do not want a column with this constant end date. The fixed end date should be built in the syntax.
How can I create a new age variable? Thanks!
Age = yrdif(DOB, "31Dec2020"d, 'AGE');
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Register now!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Select SAS Training centers are offering in-person courses. View upcoming courses for:
View all other training opportunities.