06-15-2016 12:51 PM
I am struggling with something that seems simple..
I got 2 columns...one is start time..other one is end time.
I have a 3rd column which is total time.
total time = end time - start time (in a formula)
Both start and end have HH:MM as a format.
But the Total time comes out just as HH and it rounds up.
How can I make it so it shows me HH:MM in the total column?
06-15-2016 03:31 PM
If both your time values are SAS time values, then calculating the difference is only a matter of substracting and applying the correct format to the result:
data _null_; start_time = '14:30't; end_time = '18:35't; total_time = end_time - start_time; format start_time end_time total_time hhmm6.; put (start_time end_time total_time) (=/); run;