data want;
input start_date : mmddyy10. start_time :time15. end_date :mmddyy10. end_time :time15.;
start_dt = dhms(start_date,0,0,start_time);
end_dt = dhms(end_date,0,0,end_time);
diff = (end_dt - start_dt) / 86400;
format
start_date end_date yymmdd10.
start_time end_time time15.6
start_dt end_dt e8601dt26.6
diff 10.3
;
datalines;
3/24/2021 13:24:49.287000 3/24/2021 13:30:46.886000
2/4/2021 15:25:58.501000 3/8/2021 13:59:51.848000
;
Please do us a favor and post your data as data step with datalines, so we can recreate it by copy/pasting and submitting the code.
... View more