Hard Coded Date in Formula


#1

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.


#2

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


#3

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.


#4

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!