Hello,
My over-research for something that I believe should be simple has caused me to be terribly confused on how to use today() function in a where statement.
A column in my data is in the date format DATETIME22.3. I simply want to create subset that excludes any observations with a date greater than today.
All I want is to be able to reference today as a macro &today. as DATETIME22.3.
Thanks,
Autumn
/*this gives me 0 observations because today() appears to be a different format than activity_date_update*/
data latest_activity1;
set latest_activity;
if activity_date_update > today() then delete;
run;
/*this macros I found on my research appear to be used on for character macros*/
data _null_;
call symputx('dt',put(date(),yymmddn8.);
run;
data latest_activity1;
set latest_activity;
if activity_date_update > &dt. then delete;
run;
... View more