- 06 Sep 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
Comparing dates using conditional statements in Airtable
- Updated on 06 Sep 2024
- 1 Minute to read
- Print
- DarkLight
- PDF
All plan types | |
Platform(s) | Web/Browser, Mac app, and Windows app |
Related reading |
This article covers how to compare dates using conditional statements in Airtable to streamline your team's and organization's work.
Comparing dates against one another
Using an IF statement is a quick way to compare two dates. The formula below will compare both dates, and return the second date only if it is greater than the first date, and otherwise show a blank value.
IF({Date 2} > {Date 1}, {Date 2},BLANK())
Output values depending on date comparisons
For another approach, you may want to measure the days between the current date and time, and a static date field (like the date the invoice was billed). Adding in a conditional IF statement allows you to do the following:
If the payment received field is empty
And the days passed between the current day and the day the invoice was billed is more than 25 days
Then output a message to send the customer a reminder
And if none of the above is true, output a blank value
IF(
AND({Payment Received}=BLANK(),
DATETIME_DIFF(NOW(),
{Invoice Billed},
'days') > 25),
"Send customer reminder"
)