Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
ShowAll Questionssorted byDate Posted
vinothk balasubramanian

# Exclude weekend and holidays in salesforce formula field

Hi,

I have a requirement to show the 1st Followup due date (which is 3 business days from the service Due date), 2nd Followup date (Which is 6 business days from the Service Due date) and 3rd Followup due date which is 10 business days from the service Due date and the service due date which is set when the Followup status is set to "Received by Service"

So i created formula field for the service Due date and workflow rules for 1st,2nd and 3rd Followup date and everything is working fine

Now the latest requirement is they don't want the below days to count against the calculation of 1st,2nd and 3rd Followup due dates. Here is a list of this years:

February 16,May 25,July 3,September 7,November 26,November 27,December 25

Can you please help me how we should not count the above days for the below calculation

Giving the calculation of 1st Followup due date for your reference

CASE(
MOD( DATEVALUE(Service_Due_bye__c) - DATE( 1900, 1, 7 ), 7 ),
3, DATEVALUE(Service_Due_bye__c) + 5,
4, DATEVALUE(Service_Due_bye__c) + 5,
5, DATEVALUE(Service_Due_bye__c) + 5,
6, DATEVALUE(Service_Due_bye__c) + 4,
0, DATEVALUE(Service_Due_bye__c) + 3,
1, DATEVALUE(Service_Due_bye__c) + 3,
2, DATEVALUE(Service_Due_bye__c) + 3,
null
)

Shashank (Salesforce Developers)
You may find this helpful: http://salesforce.stackexchange.com/questions/32387/excluding-weekend-and-holidays-from-my-days-number