Assuming you have SAS dates, yes you can, but you need to specify dates as a date literal in the date9 format. Or use the MDY function.
WHERE LAST_CLINIC_FOLLOW_UP > '01Jan2019'd;
WHERE LAST_CLINIC_FOLLOW_UP > mdy(1, 1, 2019);
@GS2 wrote:
Hello,
Using SAS 9.4
Is it possible to compare SAS dates in mmddyy6 format? I have my dates listed as 010119 (mmddyy) format for a specific reason and cannot change them and wanted to know if it is possible to use a where statement in proc freq to keep dates after 010119.
PROC FREQ DATA = HAVE;
TABLES LAST_NAME*LAST_CLINIC_FOLLOW_UP;
WHERE LAST_CLINIC_FOLLOW_UP > 010119;
RUN;
However, upon inspecting the data I have dates that are not after this date. Any help would be great, thank you!