Data Validation: only count working days? Today() + 20 working days - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Bjorn JacobsenBjorn Jacobsen 

Data Validation: only count working days? Today() + 20 working days

Hi 
hoping for help on how to change a data validation rule we have to only count working days.

We have a rule that checks a date field for:
"Today()+20"
This makes sure they have to pick a date that is more than 20 days away from today.

Problem: This counts Saturday/Sunday as well

Is there a way to to something like "Today+20 workdays" ?

would appreciate any input,
thanks
Bjorn
Best Answer chosen by Bjorn Jacobsen
Jeff MayJeff May
Here is a link to just one match from prior Answers (I searched for: weekdays): https://success.salesforce.com/answers?id=90630000000h3EKAAY

All Answers

Chris EdwardsChris Edwards
If you have a 5-day week, then you know that 20 working days is 4 weeks. And in four weeks you know there are 8 weekend days you need to account for.

So instead of Today() + 20, wouldn't Today() + 28 work?
Jeff MayJeff May
Here is a link to just one match from prior Answers (I searched for: weekdays): https://success.salesforce.com/answers?id=90630000000h3EKAAY
This was selected as the best answer
Bjorn JacobsenBjorn Jacobsen
thanks guys, will look into the suggestions.
I did not mention that Release Date has to be a Friday so not sure I we can just add more days to pad it out. but will read more on it.
thanks again
Bjorn
 
Chris EdwardsChris Edwards
Bjorn - it needing to be a Friday is OK, you would just need to vary the number of days to be added onto the core 20 based on what day of the week you're starting from. A case statement can do that for you quite easily.