-1

Is there proc sql code using CURRENT_DATE that I can subtract one day from it in order to extract data from the previous day?

I am trying to automate a report and need the ability to extract data from the previous day.

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
lwc0724
  • 1
  • 1

1 Answers1

0

This should do the trick:

proc sql;
  select * 
    from myTable
   where myDate = intnx("day", today(), -1);
quit;
Dominic Comtois
  • 10,230
  • 1
  • 39
  • 61
  • This returns the following error: "No authorized routine named "DATE" of type "FUNCTION" having compatible arguments was found. SQLSTATE=42884 – lwc0724 Jun 17 '16 at 09:50
  • 1
    @Iwc0724:you should add/edit the code (or at least relevant parts) you are executing in your question, the error you mention does not match to this answer, so i guess you are doing something else/different in your code... – kl78 Jun 17 '16 at 15:19