Hi, I need to calculate a turnaround time (tat) between two dates, to 2 decimal points, excluding work days. A team member helped me figure out the 1st part of the calculation, but we can't find how to exclude workdays at the minutes level. We'd appreciate some direction on this. Thank you. What we have so far: data TATcheck; infile datalines dsd truncover; format beg_date datetime16. end_date datetime16.; input beg_date:datetime16. end_date:datetime16.; datalines; 22MAR21:03:06:00,22MAR2021:18:16:00 17MAR21:13:23:00,17MAR2021:16:23:00 07APR21:12:29:00,07APR2021:17:34:00 12MAR21:16:55:08,15MAR2021:16:22:22 13MAR21:04:31:16, 15MAR2021:17:46:02 ; data tatcheck2; set tatcheck; format tat 6.2; tat = ((intck('minute',beg_date,end_date))/60)/24; run; Results: Beg_date End_date tat 22MAR21:03:06:00 22MAR21:18:16:00 0.63 (correct) 17MAR21:13:23:00 17MAR21:16:23:00 0.13 (correct) 07APR21:12:29:00 07APR21:17:34:00 0.21 (correct) 12MAR21:16:55:08 15MAR21:16:22:22 2.98 (needs to exclude weekend) 13MAR21:04:31:16 15MAR21:17:46:02 2.55 (needs to exclude weekend)
... View more