I believe that date comparisons must be in the form of
IF DATE = '01JAN2012'd
and not
IF DATE = '01/01/2012'd
regardless of the format used for the variable.
If they are all formatted as dates it won't matter:
DATA have;
infile cards dsd;
informat date mmddyy10.;
format date mmddyy10.;
INPUT date;
cards;
01/01/2012
;
data want;
set have;
date2 = date;
date3 = date;
format date2 date9. date3 yymmdd8.;
if date = date2 = date3 then match = 'yes';
run;
if you have dates coming in as numeric or character formats you might want to change that. If that doesn't help give an example of the data you have and what you are trying to do.
Mark
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.