Filter by Formula in the last 1 day

I’m trying to list all records using the Airtable API that have been updated in the last 24 hours. This job will run each day and check for the last modified column and if the date `IS_AFTER(TODAY()-1 DAY, TODAY()).

I’m struggling with the syntax. Does anyone have any guidance on this?

Hey - I can help you with the syntax - but I just wanted to say that i’ve found best practice to actually be to create a field for last updated (choose the fields you want to trigger on too) and then create a view for all the records that have been updated in the past 24 hours. You can actually just send a request with this view instead of using the formula.

Here’s the formula I think you need, though if you’d prefer to use that method :slight_smile:

IS_AFTER({Last Update [Zap]}, (DATEADD(TODAY(), -1, 'days')))
3 Likes

Thanks! Wondering how the syntax you mentioned works. What is the {Last Update [Zap]} part? Is that the column name?

Oh! Yeah - That’s whatever column name you’re using with the last updated field type

In your formula, you are trying to subtract a day but your method of subtracting one date is problematic.
IS_AFTER(TODAY()-1 DAY, TODAY())

To add a day to a date, you need to use DATEADD().

However, since you are comparing dates, I recommend using the DATETIME_DIFF() function instead. Just be careful with the order of your dates, as the order of the dates determines if you get a positive or negative difference

Both of these functions are documented in the formula field reference.


If this answers your question, please mark this post as the solution. Otherwise, could you please give a bit more details and a screen capture?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.