Does anyone know if there is a formula to calculate the turnaround time between 2 date fields and exclude weekend days?
Ex: Case opened 11/30/12, case closed 12/4/12 – how many days did it take to close the case excluding Sat and Sun.
Does anyone know if there is a formula to calculate the turnaround time between 2 date fields and exclude weekend days?
Ex: Case opened 11/30/12, case closed 12/4/12 – how many days did it take to close the case excluding Sat and Sun.
Best Answer
Check this post : http://success.salesforce.com/questionDetail?qid=a1X30000000KC20EAG (look all way below for the comment posted by NZgon)
I tried the code and works too just in case : This gives you the difference between 2 days as number excluding the weekends ( make sure the formula field is a number field)
EDIT TO ANSWER IF THE FIELDS ARE DATE TIME VALUES: As per the posting above change all the date values to DateVALUE(Date) in short change all the startDate_c to DATEVALUE(startdate_c) and EndDate_c to DATEVALUE(EndDate_c), doing replace all in notepad++ will avoid the hazzle of figuring which bracket you missed.