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
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.