[Solved] Rules: Calculate due date X days after trigger, but only count work-days, no weekends


I’ve created an automation that adds To dos (Database “To do”) to an entity, when the entity’s status is updated. I want to update my rule so it calculates and set’s the Due date for the To do.

The Due date should be X days after the rule was triggered - but I don’t want the date to end up on the weekend, so Saturdays and Sundays shouldn’t count. Only work-days (Monday-Friday; Monday-Thursday for some people on my team) should count.

For example:

  • Rule is triggered on a Friday
  • Rule creates a To do with Name “ABC”, assigns assignee from Step 1, sets Due date for “2 working days after trigger” → Due date is set for the following Tuesday and not for Sunday.

Can anyone help?

Thank you!

Formulas have the WeekDayName function to find the weekday of a particular date: WeekDayName function

If you need to consider holidays, that’s a job for a script, and you might want to interface with an external service - maybe check this: rest api days holidays calculator - Google Search

For the simplest case, Due Date = Today plus two business days, this should work:

Today() + Days(
  If(WeekDayName(Today(),"Day") = "Thursday", 4,
  If(WeekDayName(Today(),"Day") = "Friday", 3,
1 Like

Thanks so much Matt! This is perfect :blush:

It’s a bit late to revive this topic, but you could potentially leverage an external API to calculate an offset of X working days, in a similar way to what is discussed here.