The YEAR, MONTH and DAY functions retrieve the year, month and day from a date variable, respectively.
The data set above a list of dates. You can retrieve the year, month and day from the date column using the YEAR, MONTH and DAY functions.
yr = year(date);
mt = month(date);
dy = day(date);
Become a Certified SAS Specialist
Get access to two SAS base certification prep courses and 150+ practice exercises