How can I calculate business hours between two dates?
For example we have two dates; 01/01/2010 15:00 and 04/01/2010 12:00
And we have working hours 09:00 to 17:00 in weekda
I have actually done this before, taking into account all the variables (weekends, holidays, etc) for business hours is very difficult, I think this task is best done outside SQL