Hi Nick I have found this very useful, but I recently come across a situation slightly different. The macro returns the below values, but for my code I need it to say "OCT" rather than "10". I have tried formatting but it did not work. Is there a way to amend this code to get it to output the character 3 letter name of the month? Thanks macro result: 10 2016 format attempt: proc format; value $ monthnew '10' ='OCT'; run; data test; month = month(input("&sysdate9",date9.)); year = year(input("&sysdate9",date9.)); call symput('month',compress(put(month,monthnew.))); call symput('year',compress(put(year,best.))); run; %put &year; %put &month;
... View more