I have a column of dates in the best6. format e.g. 201301 is January 2013, 201402 is February 2014.
Is it possible to convert this to a date9. format?
I would ultimately like to have a column with just the year i.e. 2013, 2014, 2015, 2016 etc.
My main table is called "file1" , my column with dates is called "date1" and the column I would like with just the years is called "year1". I have tried:
data file1;
year1= date1
format year1 YEAR4.
run;
But this has not worked. It is giving me an output of two blank cells titled year1 and date1.