Date validation Formula

Hello
Looking for some help with date validation through formula builder. Board has a From Date and a To Date.

  1. From Date cannot be in the past
  2. To Date cannot be in the past
  3. To Date should be after From Date
  4. Both From and To Date CAN be today.

I am able to get conditions 1-3 to work, but #4 is challenging… Any idea how to get it to work? This is my current code to populating a Forumla column with OK or NO:

IF(
AND(
(round(DAYS({From Date},TODAY()),0)>=0),
(round(DAYS({To Date},TODAY()),0)>=0),
(round(DAYS({To Date},{From Date}),0)>=0)
),
“OK”, “NO”)

Thank you!

Hi SD,

Try:

IF(AND({From Date}>=FORMAT_DATE(TODAY(),"YYYY-MM-DD"),{To Date}>=FORMAT_DATE(TODAY(),"YYYY-MM-DD")),"OK","NO")

Want to take your formulas to the next level? Try the Advanced Formula Booster, the app that reinvents formulas in monday.

  • Create formulas without using the Formula column (and avoid its limitations)
  • Build formulas involving data from the previous item, the next item, the sub-items, the parent item, even items in the same group or the same board.
  • In one formula, update multiple columns from multiple items.

Check our blog for real use cases.

Thank you, that worked! I added in an additional condition for To Date is Greater than From Date:
(days({To Date},Today())-days({From Date},Today()))>=0

Simply use:

{To Date}>{From Date}

What if we could break free of the Formula column? and write formulas that update any type of columns? What if a formula could update multiple columns at once? This is possible with the Advanced Formula Booster app.

Thank you… I did try that first, but it didn’t work.