@LinusH wrote:
If your date column is in SAS datetime format:
where datepart(date) = "&sysdate"d;
If it's a string:
where substr(date,1,9) = "&Sysdate9";
But this feels a bit static, what happends if you want to read yesterday's data?
Depending on environment the &sysdate may have problems if the SAS session runs long enough to cross date boundary.
SYSDATE Automatic Macro Variable
Contains the date on which a SAS job or session began executing.
If your SAS sessions run for long periods it may be better to use the Today(), or identical Date(), function which accesses the system date.