DATETIME_DIFF within an IF function

#1

Hi there,

I need to calculate the difference between the {Date} and today in days, and display “todo” or nothing if the number of days is >1.

I tried this but I keep having errors :

IF(DATETIME_DIFF({Date}, TODAY(), ‘days’)>1),“To do”, " ")

Any ideas?

0 Likes

#2

You’ve got an extra parenthesis in your formula after “>1”. Remove that and it works.

FWIW, you can also remove the " " at the end, as Airtable defaults to making the fallback value blank unless otherwise specified.

1 Like