Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Get Business Time Expand / Collapse
Author
Message
Posted Monday, July 21, 2008 2:28 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, July 22, 2008 9:18 AM
Points: 4, Visits: 13
Comments posted to this topic are about the item Get Business Time
Post #537473
Posted Monday, July 21, 2008 7:28 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 11:00 AM
Points: 2,656, Visits: 19,185
Just curious, since I used something similar to your previous business day example in-house for a call center: When calculating your business time, how are you handling down-time? (or are you worrying about it?)

For instance, the phone line goes dead for two hours because somebody drove into the pole outside the building. My call center management wants to be able to block situations like this out of the calculation, so on one of 115 days, they only worked 6 hours, every other day they worked 8.

Or last friday, when the air conditioning had issues, and they let everyone go home at lunch, so 4 hours total.

My solution was to let them manage the downtime by creating a reference table with the dates and hours, and if the date was found in their list, pull the appropriate time and subtract from the daily total.

Anyone have a better way? I suppose a smarter approach would be to somehow access the telecom server and calculate the open hours in the call queue.



---------------------------------------------------------
How best to post your question
How to post performance problems
Tally Table:What it is and how it replaces a loop

"stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."
Post #537652
Posted Tuesday, April 28, 2009 11:51 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 6:36 PM
Points: 378, Visits: 2,397
Hi Megan,
I just came across your work while browsing the site. Got curious and checked it randomly. Could you please explain the below results it is giving. How may working hours per day are you assuming and what is working schecdule (Start and End timings of work each working day)

select [dbo].[fn_GetBusinessTimeElapsed] ('2009-04-24 07:18', '2009-04-28 20:18', 'HOURS')

21

select [dbo].[fn_GetBusinessTimeElapsed] ('2009-04-23 07:18', '2009-04-28 20:18', 'HOURS')

29

Sincerely,
Maz


-----------------------------------------------------------
Time Is Money
Calculating the Number of Business Hours Passed since a Point of Time
Calculating the Number of Business Hours Passed Between Two Points of Time
Post #706129
Posted Tuesday, April 28, 2009 12:02 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 6:36 PM
Points: 378, Visits: 2,397
Hi jcrawf02,

You have a very valuable suggestion to modify the solution. The solution should sum the duration from your downtime table between the two points of time and subtract it from the total time. Check my solutions. It counts for the lunch break timings also.

Sincerely,
Maz


-----------------------------------------------------------
Time Is Money
Calculating the Number of Business Hours Passed since a Point of Time
Calculating the Number of Business Hours Passed Between Two Points of Time
Post #706142
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse