2 Replies Latest reply on Nov 23, 2016 8:14 AM by Purvi Ajmera

# Calculate time excluding business hours

What is the best or easy way to calculate age between two time stamps excluding non business hours. I'm attaching workbook to better understand...didn't get too far

• ###### 1. Re: Calculate time excluding business hours

Hi Purvi,

The exact formula and process will depend on your requirements but the DATEDIFF Date Functions should help! Here's a sample idea:

1. Firs thing we need to consider is that leads may be created outside business hours, if that's the case, adjust the created data to the beginning or end of the business hours (move it to 8AM or 5PM).

2. For leads that were both created and assigned at the same day, calculate the number of minutes between them.

3. For leads that were created on one day, but assigned on another, calculate the number of minutes between them BUT subtract the number of non-business hours between those days. e.g. if 2 days have passed, multiply 2 times the number of non-business hours per day (16).

Putting that into calculated fields:

1

2 and 3

Hope this helps!

• ###### 2. Re: Calculate time excluding business hours

Thank you!