Hi @SIairtable,
You need to use the DateTime_Diff formula to calculate these dates. It would be something like
DateTime_Diff({Project Due Date}, 10, ‘days’)
BR,
Mo
Assuming you have a [Projects]
table and a [Tasks]
table where every task
is linked to a project
, and the [Projects]
table has a date field called {Due Date}
:
Your [Tasks]
table should have a lookup field pulling in {Due Date}
, and you may have a number field where you enter how many days in advance that task should be completed called {Days in Advance}
. Then you could have a formula that looks like this: WORKDAY({Project Due Date}, {Days in Advance})
.
Hi @SIairtable,
You need to use the DateTime_Diff formula to calculate these dates. It would be something like
DateTime_Diff({Project Due Date}, 10, ‘days’)
BR,
Mo
OP wants to subtract time in work days, meaning WORKDAY()
is the more appropriate function than DATETIME_DIFF()
. Using DATETIME_DIFF()
will include weekends whereas WORKDAY()
will not.
OP wants to subtract time in work days, meaning WORKDAY()
is the more appropriate function than DATETIME_DIFF()
. Using DATETIME_DIFF()
will include weekends whereas WORKDAY()
will not.
Yes you are correct, I didnt notice the Workday part.
Hi @SIairtable,
You need to use the DateTime_Diff formula to calculate these dates. It would be something like
DateTime_Diff({Project Due Date}, 10, ‘days’)
BR,
Mo
While WORKDAY()
is definitely the choice to exclude weekends, there’s some confusion in this discussion, with DATETIME_DIFF()
getting mixed up with DATEADD()
. I believe that @Mohamed_Swellam meant to list DATEADD()
originally, which is the correct option for calculating new dates based on a start date and offset. DATETIME_DIFF()
is used for calculating the span of time between two dates.
While WORKDAY()
is definitely the choice to exclude weekends, there’s some confusion in this discussion, with DATETIME_DIFF()
getting mixed up with DATEADD()
. I believe that @Mohamed_Swellam meant to list DATEADD()
originally, which is the correct option for calculating new dates based on a start date and offset. DATETIME_DIFF()
is used for calculating the span of time between two dates.
Thank you all! Very helpful -
Still having some trouble since the workdays are actually starting on Sundays - so the week is Sun - Thursday
Has anyone else had that problem?
Thank you all! Very helpful -
Still having some trouble since the workdays are actually starting on Sundays - so the week is Sun - Thursday
Has anyone else had that problem?
My gut says that it’s a timezone issue. Under the hood, it’s probably working correctly and operating with Monday-Friday days, but the days and times coming back will likely need to be shifted to show up properly, and the specific amount of shift will depend on your timezone. You can probably figure out how far off everything is and use DATEADD()
to make the adjustment.