Help

Hard Coded Date in Formula

5659 3
cancel
Showing results for 
Search instead for 
Did you mean: 
creighton_uyech
4 - Data Explorer
4 - Data Explorer

I have a date field and need to create a formula that compares the data in this date field to a hard coded date. IF (date field > 1/21/2019, x, y) as an example. How do I enter 1/21/2019 in a formula? I know there are different ways to do that in Excel but none of those seem to work in an AirTable field.

3 Replies 3
Mike_McLaughlin
8 - Airtable Astronomer
8 - Airtable Astronomer

have a look at DateTime_DIff() and formatting info should be here:

AFAIK, is it possible to use also logical operators to compare dates. Anyway, the key is how to enter a date string that is valid.

According this post, the format depeds on the browser locale/language. The best way is to use DATETIME_PARSE so you tell Airtable which format is the date written.

Captura de pantalla 2019-02-04_08-43-55_p. m..png

creighton_uyech
4 - Data Explorer
4 - Data Explorer

Thank you for your suggestions. Airtable Support did get back to me and it was fairly simple. I just needed to put the hard coded date in single quotes. For my request, the resolve was IF(IS_AFTER({Date Field}, ‘1/21/19’),1,0). It worked!