function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AV DivyaAV Divya 

#Excludingholidays

Hi Experts,

Can someone help in excluding holidays from a custom Date__c field in a custom object?
Khan AnasKhan Anas (Salesforce Developers) 
Hi,

I trust you are doing very well.

Please refer to below link which might help you.

https://success.salesforce.com/answers?id=9063A0000019QHUQA2

It is an idea (https://success.salesforce.com/ideaView?id=08730000000I75dAAC) to exclude both holidays and weekends in Formula.

If you want to calculate the number of days between two dates while excluding weekends or weekdays, you can refer to below knowledge article.

https://help.salesforce.com/articleView?id=000004526&type=1

However, you can use this Apex code to exclude holidays and weekends in Formula.

https://sfdcdev.wordpress.com/2011/09/24/handling-holidays-in-salesforce-apex/


I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future.

Thanks and Regards,
Khan Anas
Shamsi 110Shamsi 110
refer to below link
https://success.salesforce.com/answers?id=9063A0000019QHUQA2

Kindly let me know if it helps you and mark this as solved.

Thanks and Regards,
Hasan Shamsi