Help

Re: date comparison bug? or just am I making any mistake?

Solved
Jump to Solution
1363 1
cancel
Showing results for 
Search instead for 
Did you mean: 
David_Alonso
6 - Interface Innovator
6 - Interface Innovator

Something sooooo wierd is happening to me that is driving me crazy

I am trying to compare a date with today. Easy task aparently. (anyway working on dates is never easy to me)

Look what is going on:

Two date fields created

Date 1 is TODAY

David_Alonso_0-1692946524395.png

Date 2, the date of a free class at my school

David_Alonso_1-1692946569132.png

Now i created two testing formulas

David_Alonso_2-1692946625220.png

And testing 2. Just substituting Date 1 field by today()

David_Alonso_3-1692946679015.png

 

So both formulas are supposed to give the same output, but....

David_Alonso_4-1692946782629.png

OMG!!! no idea about what is happening! Any help please!

 

1 Solution

Accepted Solutions

Airtable has a set of functions to handle dates (since it doesn't treat them as Excel would, as date-based numbers). In this case, you can use IS_BEFORE({Date of free class}, TODAY()).

https://support.airtable.com/docs/formula-field-reference#date-and-time-functions

See Solution in Thread

3 Replies 3
Sho
11 - Venus
11 - Venus

"Date 2" seems to be recognized as a string.

 

DATETIME_PARSE({CG},"M/D/YYYY h:mma")

 

to parse it correctly would fix the problem.

David_Alonso
6 - Interface Innovator
6 - Interface Innovator

Oh! so clever attemp, thaaaanks, but it is not working neither. CG is a date so this formula returns an ERROR

 

David_Alonso_0-1692965451205.png

 

Airtable has a set of functions to handle dates (since it doesn't treat them as Excel would, as date-based numbers). In this case, you can use IS_BEFORE({Date of free class}, TODAY()).

https://support.airtable.com/docs/formula-field-reference#date-and-time-functions