What's wrong with this formula?


#1

Someone please enlighten me as to why Airtable won’t accept this?

IF(
AND(TODAY()<={Date to Make}, TODAY()>={Field 6}),
“Yes”, “Not Time Yet”
)


#2

Are those Date fields? I don’t see anything wrong, also maybe you could use is_after and is_before.


#3

@Elias_Gomez_Sainz Thanks for the reply! And the Date to Make is a date field. Field 6 is a formula field with a Date output and format. Would that cause an issue?


#4

I think not, I meant Date value. I’m tempted to try in a demo base :sweat_smile:


#5

It’s working for me:

IF(AND(TODAY()<={Date to Make}, TODAY()>={Field 6}),"Yes", "Not Time Yet")

Demo: https://airtable.com/shryBdRv29xE6agoU

I’ve removed the line breaks and replaced the quotes (I think the forum styles them).


#6

Excellent! Yes for some reason copying your version worked. That’s interesting. I did the code in a text editor to get a better understanding of it, so I guess when I copied and pasted into the formula field, it didn’t accept it. Now I know to simply type it out instead! Thanks!


#7

Yeah, watch out for those curly quotes - that will break a formula.


#9

IF(AND(TODAY()<={Date to Make}, TODAY()>={Field 6}),“Yes”, “Not Time Yet”)

I’ve pasted straigth quotes, but the forum convert them into curly.


#10

@Elias_Gomez_Sainz

To keep the forum from ‘pretty-fying’ your quotes, mark your formulas as code.

Mark brief snippets as inline code by preceding and following them with a ‘backtick’ (what the rest of the world knows as a grave accent, which on a Spanish keyboard is probably the two-stroke character of [grave][space bar]).

The forum eats redundant spaces in text marked as inline code, so it can’t be used to show indentation. For longer sequences of code, either precede and follow the segment with three backticks on a line by themselves, or precede the segment with a blank line, and begin each line with 4 space characters.

Segments set off by triple backticks are displayed in embedded, scrolling panes

like












                                this
 












                                                                    one.

Segments set off by a blank line and preceded with space characters are indented slightly, with internal indentation preserved

as
    in
        this
            example.