Finding the mode (maximum density) of a distribution from a sample is not a trivial problem. If you don't mind using the magic of statistical procedures, the following will do the job:
proc sort data=sasforum.Flight_demo out=fd; by carrier; run;
proc kde data=fd;
by carrier;
univar departuretime / out=fdDist plots=none;
run;
proc sql;
create table busyTime as
select carrier, value as busyTime format=time.
from fdDist
group by carrier
having density=max(density);
quit;
This method might miss departure peaks situated around midnight on rare occasions.
... View more