Skip to main content

Calculating Status Update based on date

  • Jan 28, 2021 6:26 AM UTC
  • 3 replies
  • 83 views

Hi there, I’m hoping someone may be able to help with a formula to update a status, based on the date being entered in another field

I’m going along the lines of:
IF:
DATETIME_DIFF({Date Cleared},NOW(),‘days’)<30,“ :open_book: Recently Closed”

DATETIME_DIFF({Date Cleared},NOW(),‘days’)>30),“ :closed_book: Closed”

“ :exclamation: Open”

Thank you

This topic has been closed for replies.

3 replies

Forum|alt.badge.img+18
  • Inspiring
  • Jan 28, 2021 6:35 PM UTC

If {Date Cleared} is empty, your formula is probably generating NaN as a result. Wrap the whole thing in an IF({Date Cleared}, …, “Open”).

Secondly, I think DATETIME_DIFF is generating a negative number for you where you assume it’s positive. I’m surprised you’re not getting “Recently Closed” for all rows with a {Date Cleared}. I could be wrong about this though.

Just my guesses.


  • Author
  • New Participant
  • Feb 2, 2021 11:33 PM UTC

If {Date Cleared} is empty, your formula is probably generating NaN as a result. Wrap the whole thing in an IF({Date Cleared}, …, “Open”).

Secondly, I think DATETIME_DIFF is generating a negative number for you where you assume it’s positive. I’m surprised you’re not getting “Recently Closed” for all rows with a {Date Cleared}. I could be wrong about this though.

Just my guesses.


Thank you. However I still can’t get this to work. The formula I’m using is now:

IF(OR(DATETIME_DIFF({Date Cleared},NOW(),‘days’)<30,“ :open_book: Recently Closed”,DATETIME_DIFF({Date Cleared},NOW(),‘days’)>30),“ :closed_book: Closed”,“ :exclamation: Open”)

But everything is showing as “Closed” … any ideas? :woman_shrugging:


Forum|alt.badge.img+18
  • Inspiring
  • Feb 3, 2021 3:09 PM UTC

Thank you. However I still can’t get this to work. The formula I’m using is now:

IF(OR(DATETIME_DIFF({Date Cleared},NOW(),‘days’)<30,“ :open_book: Recently Closed”,DATETIME_DIFF({Date Cleared},NOW(),‘days’)>30),“ :closed_book: Closed”,“ :exclamation: Open”)

But everything is showing as “Closed” … any ideas? :woman_shrugging:


I don’t think you need the “OR”. But first, start small ok? Try part of your formula first to see what values you see. It might surprise you.

DATETIME_DIFF({Date Cleared},NOW(),‘days’)

Then, build up from there. As I said before if you wrap your formula in IF({Date Cleared}, #ALL OF YOUR IF FORMULAS#, “Open”), then it should handle the “Open” rows fine.

Let me know what you find.