Category: Solutions

Calculate Case or Task Age in Business Hours

SalesForce

Salesforce.com has task age, case age, stage duration and a variety of other measures built in, but they always include weekends, which isn't helpful if you are trying to measure SLAs relative to business hours.

This requirement which popped up a few weeks back - a field which can give the case age in business hours [excluding saturdays and sundays]. There was no function in salesforce which provided me the day given the date. I came about with a round about logical solution - a formula(number with 0 digits after decimal point) field which excludes saturdays and sundays when calculating the case age.

CASE(
MOD(DATEVALUE(CreatedDate) - DATE(1900, 1, 7), 7),
0, (TODAY() - DATEVALUE(CreatedDate)) - 1 - FLOOR((TODAY() - DATEVALUE(CreatedDate))/7)*2,
1, (TODAY() - DATEVALUE(CreatedDate)) - FLOOR((TODAY() - DATEVALUE(CreatedDate))/7)*2,
2, (TODAY() - DATEVALUE(CreatedDate)) - FLOOR((TODAY() - DATEVALUE(CreatedDate))/7)*2,
3, (TODAY() - DATEVALUE(CreatedDate)) - FLOOR((TODAY() - DATEVALUE(CreatedDate))/7)*2,
4, (TODAY() - DATEVALUE(CreatedDate)) - FLOOR((TODAY() - DATEVALUE(CreatedDate))/7)*2,
5, (TODAY() - DATEVALUE(CreatedDate)) - 2 - FLOOR((TODAY() - DATEVALUE(CreatedDate))/7)*2,
6, (TODAY() - DATEVALUE(CreatedDate)) - 2 - FLOOR((TODAY() - DATEVALUE(CreatedDate))/7)*2,
null)

Talk to us to find out more solutions in Salesforce.com

 

ASX-listed national company goes live in 6 weeks on Sales Cloud

SalesForce

We recently helped this $600m division of a major services company implement Salesforce.com Sales Cloud for pipeline and activity management in time for their new financial year.

Talk with us to find out how you can increase sales effectiveness, close rates and lead conversion and improve collaboration among your sales teams with Salesforce.com