First of all, it is recommended that you include appropriate words in the subject.
Also, it is easier to get an answer if you provide sample data, variables, and exact conditions in your question.
Then, to answer your question
Since the formatting seems to be applied to both times, they can actually be subtracted directly as numeric data, as follows.
data want;
set have;
response_time=hospital_arrival_time-dispatch_time;
run;