Help

Re: Datetime Difference

Solved
Jump to Solution
553 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Antony_Bearpark
5 - Automation Enthusiast
5 - Automation Enthusiast

Struggling with the Date time difference not showing the correct status. The problem is the failing to return “Due Soon” instead of “Due Tomorrow”. Today, the date is 24 August, but projects marked with a 26 August deadline are showing as “Due Tomorrow” and I don’t know why…

IF(OR({Status}="To Do", {Status}="WIP"),
IF({Deadline}=BLANK(), "Not Due",
IF({Deadline}=TODAY(), "Due Today",
IF(DATETIME_DIFF(
  TODAY(), {Deadline}, 'days') <= 1, 
  "Due Tomorrow",
IF(DATETIME_DIFF(
  TODAY(), {Deadline}, 'days') > 1, 
  "Due Soon",
IF(IS_AFTER(
  TODAY(), {Deadline}), "Overdue"))))),"-")
1 Solution

Accepted Solutions
TheTimeSavingCo
17 - Neptune
17 - Neptune

Hi @Antony_Bearpark, could you try switching your DATETIME_DIFF variables resulting in this?

IF(OR({Status}="To Do", {Status}="WIP"),
IF({Deadline}=BLANK(), "Not Due",
IF({Deadline}=TODAY(), "Due Today",
IF(DATETIME_DIFF(
  {Deadline}, TODAY(), 'days') <= 1, 
  "Due Tomorrow",
IF(DATETIME_DIFF(
  {Deadline}, TODAY(), 'days') > 1, 
  "Due Soon",
IF(IS_AFTER(
  TODAY(), {Deadline}), "Overdue"))))),"-")

I think that’s where the issue lies, and here’s a screenshot illustrating the issue
Screenshot 2022-08-24 at 6.12.31 PM

See Solution in Thread

1 Reply 1
TheTimeSavingCo
17 - Neptune
17 - Neptune

Hi @Antony_Bearpark, could you try switching your DATETIME_DIFF variables resulting in this?

IF(OR({Status}="To Do", {Status}="WIP"),
IF({Deadline}=BLANK(), "Not Due",
IF({Deadline}=TODAY(), "Due Today",
IF(DATETIME_DIFF(
  {Deadline}, TODAY(), 'days') <= 1, 
  "Due Tomorrow",
IF(DATETIME_DIFF(
  {Deadline}, TODAY(), 'days') > 1, 
  "Due Soon",
IF(IS_AFTER(
  TODAY(), {Deadline}), "Overdue"))))),"-")

I think that’s where the issue lies, and here’s a screenshot illustrating the issue
Screenshot 2022-08-24 at 6.12.31 PM