The reason, I doubt, is because SAS store inaccurate number of datetime in macro variable. From example below, you could see &min resolve to 1.6098E9, put it into datetime format, it become to: 04JAN2011:22:40:00, not 05Jan2011:11:34:11, so you could not delete row. Do I miss thing here? data have; input date datetime19.; format date datetime19.; cards; 01Jul2013:05:22:14 23Aug2012:06:11:12 05Jan2011:11:34:11 ; run; proc sql; select count(distinct date),min(date)into:num,:min from have; quit; %put &num &min %sysfunc(putn(&min,datetime19.));
... View more