0

I'm trying to check if the value in the DOB field is greater than a given date. My code is parametrized by year of service. For instance, when I have the reference date as '31Dec2010'd, it works fine. But when part of it contains a reference to another macro variable, I get an error message.

%let yos = 2010; and inside a data step, I have if date_of_birth > '31Dec&yos.'d ... some code follows. Then I get the following error message: "invalid date/time/datetime constant '31Dec&yos.'d.

Any ideas, Thanks

  • 1
    Hi, your issue is answered in the duplicate question linked (see top). You need to use " (double quotes) not ' (single quotes). Please leave additional information if your problem is not related to this. – Joe Apr 21 '15 at 21:58
  • Thanks. Using double quotes instead of single quotes fixed the problem. – user4816715 Apr 21 '15 at 22:45

0 Answers0