Get filtered records from Airtable using Date Formula with Integromat

Hello all,

After hours of trial and error finally, i have figured out the correct way to put the formula in Airtable's "Search Records" module on Integromat.

My client wanted to have all rows from the table which either have "date added" or "date modified" (these are a column in the table) as the day before.

This might be a small solution but as i spent hours finding the correct fit i think this could be helpful to many out there searching for the solution.

In Airtable, you can have a formula on the column level. You have to select the field type as formula given in the below image

image.png

But let's say if you want to match the value with a specific date. For example, show only records where Date column (any column having date) contains "2020-09-15".

So the formula to get those records are using the DATETIME_FORMAT function.

Refer to this airtable guide to read about it.

Real use case, my client wanted to search the records from the table "Office Spaces" where the Date Available (Date column) is always the previous date.

So for that, the formula would be

image.png

Here first, i have used the DATETIME_FORMAT function. The DATETIME_FORMAT function will allow you to reformat the data from the date-type field into a string of your specifications. So here i am trying to convert the date to string and then matching it with the previous date.

Just in case you need to see it, copy-paste the following in your formula field

DATETIME_FORMAT({Date Available},'YYYY-MM-DD')='{{formatDate(addDays(now; -1); "YYYY-MM-DD")}}'

I hope i have briefly explained to you all.

Thanks for reading.