Calculate hours between two timestamps
I'd like to find a way to calculate the hours and minutes between two timestamps excluding weekends and with the ability to choose the start/finish time of the workday.
Start Date: 01-13-2012 11:30:00 AM
End Date: 01-14-2012 12:30:00 PM
I would like to result to be 7:00:00 based on an 8 hour day from 8:30 to 4:30. I would also like the option to adjust the length of the day in case there is a second shift working on the same task.