The following formula will calculate the number of days between today and the due date unless the due date is a Saturday or Sunday, otherwise its the difference between today and the last Friday before the due date.
DATETIME_DIFF(
DATEADD(
{Due Date},
SWITCH(WEEKDAY({Due Date}), 0, -2, 6, -1, 0),
'days'
),
TODAY(),
'days'
)
The following formula will calculate the number of days between today and the due date unless the due date is a Saturday or Sunday, otherwise its the difference between today and the last Friday before the due date.
DATETIME_DIFF(
DATEADD(
{Due Date},
SWITCH(WEEKDAY({Due Date}), 0, -2, 6, -1, 0),
'days'
),
TODAY(),
'days'
)
Thank you for this! One more question… if I want the calculation to not be from today, but from a Launch Date field… would I just swap out TODAY with {Launch Day} or something like that?
So if the launch day is set to August 31 the Due Day should be Aug 1st, unless it’s a weekend…
Thank you for your help, I’m still learning!
Thank you for this! One more question… if I want the calculation to not be from today, but from a Launch Date field… would I just swap out TODAY with {Launch Day} or something like that?
So if the launch day is set to August 31 the Due Day should be Aug 1st, unless it’s a weekend…
Thank you for your help, I’m still learning!
Yes, you would replace TODAY()
with {Launch Date}
.
To clarify, this formula is not calculating a Due Date. It assumes you already know the due date and is calculating the number of days between the launch date and the due date.
Yes, you would replace TODAY()
with {Launch Date}
.
To clarify, this formula is not calculating a Due Date. It assumes you already know the due date and is calculating the number of days between the launch date and the due date.
Oh I see.
I was looking for it to tell me the Due Date if I only know the Launch Date… where the due date is 30 days before the launch date unless its a weekend. Sorry for the confusion and thanks for your help.
Oh I see.
I was looking for it to tell me the Due Date if I only know the Launch Date… where the due date is 30 days before the launch date unless its a weekend. Sorry for the confusion and thanks for your help.
DATEADD(
DATEADD({Launch Date}, -30, 'days'),
SWITCH(
WEEKDAY(
DATEADD({Launch Date}, -30, 'days')
),
0, -1,
1, -2,
0
),
'days'
)
(turn off “Use the same time zone (GMT) for all collaborators” in the field formatting options)
@Dennis_Petrou Did @Kamille_Parks provide the answer you were seeking? If so, please mark her comment above as the solution to your question. This helps others who may be searching with similar questions. Thanks!