Calculating difference between opened date/time and closed date/time and excluding weekends, holidays and off business hours

RishiKapoor

New Member
Joined
Sep 10, 2019
Messages
6
I have an excel sheet that lists the opened and closed date/time for a ticket.
Our SLA’s are based upon created date/time during the coverage hours – 8am ET until 5pm ET (weekends and national holiday’s, both US and India, excluded).
If ticket is received prior to 8am ET or after 5pm ET, the clock doesn’t start until the coverage begins for the business day.
Example: case is received at 11pm ET, because our coverage begins at 8am on each business day, the SLA for this case would begin at 8am ET on the next business day.
Example: case is received on Saturday at 12:03am ET, SLA for the case begins on next business day at 8am ET.

I am having a hard time to figure out the formula in excel. NETWORKDAYS does not completely work since I need to figure out a way to calculate SLA on the basis of time too.



Case NumberCase OwnerDate Time OpenedDate/Time Closed
1901-3699490Rishi Kapoor1/1/2019 20:581/3/2019 12:02
1901-3699622Sue Palmer1/2/2019 4:011/3/2019 13:06
1901-3699643Vane Ahuja1/2/2019 4:281/2/2019 7:44
1901-3699688Rishi Kapoor1/2/2019 5:091/2/2019 8:43
1901-3699690Rishi Kapoor1/2/2019 5:101/2/2019 8:50
1901-3699694Rishi Kapoor1/2/2019 5:121/2/2019 9:01

<tbody>
</tbody>
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Please provide the expected results for all 6 of those cases.
Also, is your date format DD/MM/YYYY or MM/DD/YYYY ?
 
Upvote 0
Hi Gerald,

Thank you for the response. The data here is in mm/dd/yyyy format. Ideally I would need the data to be in number of days format but that is something I can easily do if I can get the number of hours between the 2 dates/times keeping the working hours in mind. Also the data above is already in EST format.

Thanks,
Rishi
 
Upvote 0
For example the first row. The case came in at 8:58 PM EST on 1st. The SLA would start at 8 AM on 2nd Jan and run till 5 PM EST on the 2nd. The SLA would stop again since it is outside working hours and would start again for 4 hours on 3rd. So the total time it took to process the first case is 13 hours

Thanks
 
Upvote 0
Hi Gerald,

Please see below:

Case NumberCase OwnerDate Time OpenedDate/Time ClosedTime to Closure
1901-3699490Rishi Kapoor1/1/2019 20:581/3/2019 12:0213
1901-3699622Sue Palmer1/2/2019 4:011/3/2019 13:0614
1901-3699643Vane Ahuja1/2/2019 4:281/2/2019 7:440
1901-3699688Rishi Kapoor1/2/2019 5:091/2/2019 8:430.43
1901-3699690Rishi Kapoor1/2/2019 5:101/2/2019 8:500.5
1901-3699694Rishi Kapoor1/2/2019 5:121/2/2019 9:011


<colgroup><col width="221" span="5" style="width:166pt"> </colgroup><tbody>
</tbody>


[FONT=&quot]If the case is received before the 8am ET business day, the create date/time is 8am on the next business day. If the case is closed after 5pm ET, the case closed date is at 8am on the next business day.
[/FONT]
 
Upvote 0
In post #6 , I think you have stated the "Time to Closure" incorrectly in some cases.

For case 1901-3699490, I assume you treat 2nd Jan as a working day, therefore I think the time to closure is 13h 2m, is that correct ?
For the next one, I think it is 14h 5m, is that correct ?
For case 1901-3699643, I take it the answer is 0 because Time Opened and Time Closed are both on the same date, before 08:00. Is that correct ?
For the next two, I think the results should be 0h 43m, and 0h 50m, yes ? Which are different from 0.43 hours and 0.5 hours.
For the final one, I think it is 1h 1m, correct ?
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,691
Members
448,978
Latest member
rrauni

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top