I need to calculate business hours between to dates.
I need to exclude following from that hours.
- Out of working hours (6pm -9am)
- Weekends
- Holidays
For holidays I have a table HOLIDAYS as
DATE NAME ---------------------------------- 2012-01-02 New Year's Day 2012-04-06 Good Friday 2012-04-09 Easter Monday
Notes:
1. I have hours in start and finish dates (‘2012/03/15 14:00’ to ‘2012/03/22 17:30’).
2. I’m using Sql Server 2005 so I don’t have datetypes DATE or TIME.
Try this.