Airtable Blog formulas overcomplicated?

I think the formula posted to the Airtable blog here, under the heading " Figure out which date comes first :soon:" is way too complicated.

The formula on the blog is posted as:

IF(IF(XOR(BLANK(),{Expiration Date},{Date})=1,"",IF(OR({Date},Expiration Date)=1,IS_BEFORE({Expiration Date},{Date}),"")),“:warning: Expired”,“Ok”)

Mistake #1 is obviously that the second Expiration Date needs {}. Simple enough. But couldn’t it be written more simply as:

IF(IS_BEFORE({Expiration Date},{Date}),“:warning: Expired”,“Ok”)

? I get the same results.

Even if we stick to the same original formula, I can delete all of the bolded bits and return the same results:

IF(IF(XOR(BLANK(),{Expiration Date},{Date})=1,"",IF(OR({Date},Expiration Date)=1,IS_BEFORE({Expiration Date},{Date}),"")),“:warning: Expired”,“Ok”)

Am I missing something? Just trying to understand. Thanks for

Welcome to the community, @Spencer_Cook! :smiley: That post is a bit old, especially in software development terms. I didn’t discover Airtable until several months after that, so this next statement is pure theory, but perhaps some of Airtable’s date-related features operated differently at the time that post was written, and the extra code was needed to make it work. Only the devs can say for sure. Your shorter version certainly works better now. :+1:

1 Like