Assuming your load time is actually a date and your data provided is incorrect: proc sql noprint; select max(put(AS_OF_DT, date9.)), max(put(DW_LOad_time, datetime21.)) into :max_date, :max_time from have; quit; %put &max_date &max_time; Assuming your load time is actually a date and you need to convert it to datetime proc sql noprint; select max(put(AS_OF_DT, date9.)), max(put(dhms(DW_LOad_time,0,0,0), datetime21.)) into :max_date, :max_time from have; quit; %put &max_date &max_time;
... View more