Help

Re: Airtable Blog formulas overcomplicated?

647 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Spencer_Cook
4 - Data Explorer
4 - Data Explorer

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

1 Reply 1

Welcome to the community, @Spencer_Cook! :grinning_face_with_big_eyes: 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. :thumbs_up: