0

I am programming in SAS and I am trying to figure out how to use a macrovariable within a date variable;

an example would be something like

%let year = 2015;
data test;
set;
date = '01JAN&year.'d;
run;

Thanks for your help!

1 Answers1

0

Use double quotes and format the variable using the date9. format:

%let year = 2015;
data test;
    format date date9.;
    date = "01JAN&year."d;
run;
Sean
  • 1,120
  • 1
  • 8
  • 14