
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Nov 19, 2024 09:56 AM
I'm using a simple formula to calculate the due date difference between today and the project due date:
WORKDAY_DIFF(TODAY(), {Due Date})-1
 
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Nov 19, 2024 05:34 PM - edited ‎Nov 19, 2024 05:35 PM
WORKDAY_DIFF outputs "1" for the difference between the same day, so one day ago outputs "-2", your formula then does a "-1", so it's doing "-2-1", resulting in "-3"
Try using an IF to handle it, and here's an example where "TODAY()" is harcoded as a field:
IF(
WORKDAY_DIFF(
Date,
{TODAY()}
)>0,
WORKDAY_DIFF(
Date,
{TODAY()}
) - 1,
WORKDAY_DIFF(
Date,
{TODAY()}
) + 1
)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎Nov 19, 2024 05:34 PM - edited ‎Nov 19, 2024 05:35 PM
WORKDAY_DIFF outputs "1" for the difference between the same day, so one day ago outputs "-2", your formula then does a "-1", so it's doing "-2-1", resulting in "-3"
Try using an IF to handle it, and here's an example where "TODAY()" is harcoded as a field:
IF(
WORKDAY_DIFF(
Date,
{TODAY()}
)>0,
WORKDAY_DIFF(
Date,
{TODAY()}
) - 1,
WORKDAY_DIFF(
Date,
{TODAY()}
) + 1
)
