I would use your code to calculate all the minutes between these two dates, but then I would subtract the number of minutes during which your business is closed.
To do this, use this function to calculate the number of working days (therefore, delete the weekend) and multiply the output by 630 (10 hours and half * 60 = the number of minutes per day when your company is open).
Having added everything, it will be something like this:
(your result) - (number of work days between the beginning and the end of the request) * 630
It does not take into account the holidays. Hurrah!
EDIT : since this link requires registration, here is a short version of the code itself; check the source source for details, as I am not the author of it:
SELECT (DATEDIFF(dd, @StartDate, @EndDate) + 1) -(DATEDIFF(wk, @StartDate, @EndDate) * 2) -(CASE WHEN DATENAME(dw, @StartDate) = 'Sunday' THEN 1 ELSE 0 END) -(CASE WHEN DATENAME(dw, @EndDate) = 'Saturday' THEN 1 ELSE 0 END)
source share