As Art suggested the first step is to convert all dates to SAS dates. You do not need to do so here, but it is almost always a best practice. Once dates are converted they can be used to merge or join the tables. The formats currently assigned have nothing to do with the problem it is the stored values that you need to deal with. Conside the following simple example of conversion of both numeric and character dates. data char; input cdate $6.; date = mdy(input(substr(cdate,5,2),2.),01,input(substr(cdate,1,4),4.)); datalines; 199101 199202 run; data num; input ndate 6.; date = mdy(mod(ndate,100),01,int(ndate/100)); datalines; 199202 199303 run; data want; merge char num; by date; run; proc print data=want; run; If you want the SAS date to appear in the YYYYMM format use the YYMMN6. format.
... View more