Hi
I have a piece of SQL which works out hours and minutes between two dates:
CONVERT(VARCHAR(10), DATEDIFF(MINUTE, D.RepairInstructed, A.EstimateReceived) / 60) + '.' + CASE WHEN LEN(DATEDIFF(MINUTE, D.RepairInstructed, A.EstimateReceived) % 60) = 1 THEN '0' + CONVERT(VARCHAR(10), DATEDIFF(MINUTE, D.RepairInstructed, A.EstimateReceived) % 60) ELSE CONVERT(VARCHAR(10), DATEDIFF(MINUTE, D.RepairInstructed, A.EstimateReceived) % 60) END AS 'EstimateRecievedTime'
What I would like to do is do the same calculation but omit the weekends - so only to include Monday to Friday.
Any idea on how to do this please?
Thanks.