Filterbyformula by select by partial dates

Topic Labels: API
1440 1
Showing results for 
Search instead for 
Did you mean: 
5 - Automation Enthusiast
5 - Automation Enthusiast

I want to do a filterbyformula search through the api in a date field. My field is an ISO date field in YYYY-MM-DD format. Basically, I want to do a “select” call to the DB, with a filterbyformula, but only looking for a record that equals “today”, just with today’s date, but not time! (Too specific, and would fail!) So I would need to match 2019-06-12, for example, but not the full ISO string. How would I write that filterbyformula code in nodejs? It’s a headscratcher?

1 Reply 1
8 - Airtable Astronomer
8 - Airtable Astronomer

You will want to use the DATETIME_DIFF function

For example.

DATETIME_DIFF(TODAY(), {Date A}, ‘days’)

The above formula will return the difference between in days between Today and the field {Date A}
If the difference is zero it means that the recrod’s date field is equal to today.

You may also want to see this link for a complete list of all the functions available