Is there a script or automation I could use - if due date is saturday or sunday, change due date to friday before?
Thanks!
Is there a script or automation I could use - if due date is saturday or sunday, change due date to friday before?
Thanks!
You can do this using a few formulas instead of an automation if you’d like.
Here is a formula that could change the date (we’ll call it Calculated Date):
IF({Due date field}="",{Due date field},DATEADD({Due date},
SWITCH(WEEKDAY({Due date field}), 0, -2, 6, -1, 0),'days'))
If you’d like to do it with automation to update the existing due date field automatically, you could do it a few ways:
With a helper column in your table using the field you just created above and one additional helper column (we’ll call this Date Check)
IF({Due date field}={Calculated date},"Yes","No")
The benefits to using the additional columns (3 total: Your original Due Date, Calculated Date, & Date Check) is that it limits the need for addition views that an automation that would be dependent on it to run successfully. Additionally, this achieves the same process if you wanted to use a script, just a bit easier.
Hopefully that helps!
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.