+ Start a Discussion

Case age in HH:MM format

Hi, I want to calcualte the difference b/w the two date/time fileds in Hours: Minutues format excluding weekend days

Here are the two fileds 

1. Date/Time opened : 2/11/2015
2. Accepted Date      : 8/11/2015

Here i want to create 3rd field (formula) to calculate the case age in HH:MM format 9excluding weekend days- Satday and sunday). Can you help ?

Thanks in Advanse,

You can find the difference between the timing in formula but how you can exclude the weekends, I think you need to go for Code this.

Ashlekh Gera
Hi, using the formula field i have calculated days, but i need to change it to Hours; Minuties format, not days :)  

CASE(MOD( DATEVALUE(CreatedDate) - DATE(1985,6,24),7), 0,CASE( MOD(DATEVALUE(Case_Accepted_Date__c) - DATEVALUE(CreatedDate),7),1,2,2,3,3,4,4,5,5,5,6,5,1), 1,CASE( MOD(DATEVALUE(Case_Accepted_Date__c) - DATEVALUE(CreatedDate),7),1,2,2,3,3,4,4,4,5,4,6,5,1), 2,CASE( MOD(DATEVALUE(Case_Accepted_Date__c) - DATEVALUE(CreatedDate),7),1,2,2,3,3,3,4,3,5,4,6,5,1), 3,CASE( MOD(DATEVALUE(Case_Accepted_Date__c) - DATEVALUE(CreatedDate),7),1,2,2,2,3,2,4,3,5,4,6,5,1), 4,CASE( MOD(DATEVALUE(Case_Accepted_Date__c) - DATEVALUE(CreatedDate),7),1,1,2,1,3,2,4,3,5,4,6,5,1), 5,CASE( MOD(DATEVALUE(Case_Accepted_Date__c) - DATEVALUE(CreatedDate),7),1,0,2,1,3,2,4,3,5,4,6,5,0), 6,CASE( MOD(DATEVALUE(Case_Accepted_Date__c) - DATEVALUE(CreatedDate),7),1,1,2,2,3,3,4,4,5,5,6,5,0), 999) + (FLOOR((DATEVALUE(Case_Accepted_Date__c) - DATEVALUE(CreatedDate))/7)*5)