I’m getting stuck on this formula, please help! I have the following fields:
Status (single select)
Due Date (date)
I would like to have a new field “days past due” that shows the number of days past the due date IF the status is “past due”. Otherwise, leave the field blank.
I’m probably close (??) , but I tried the following two methods and am getting an error.
You can’t use math operators with Dates in Airtable, like you can with a lot of other systems. Instead, Airtable offers Date/Time specific formulas for these kinds of operations:
You can’t use math operators with Dates in Airtable, like you can with a lot of other systems. Instead, Airtable offers Date/Time specific formulas for these kinds of operations:
Parentheses surround a function’s parameters: IF(condition, "value if true", "value if false"). Some functions like TODAY() don’t take parameters, but they still need to be followed by a pair of parentheses.
So looking at your first formula:
{{Due Date} >= TODAY()} is not a field name, it shouldn’t be within curly braces.
(DATETIME_DIFF()({Due Date},TODAY,‘day’)) does not need the surrounding parentheses, the function properties for DATETIME_DIFF are outside its parentheses, and TODAY doesn’t have parenthesis after it at all.
You have similar issues with your second formula where the parentheses are in the wrong places.
You can’t use math operators with Dates in Airtable, like you can with a lot of other systems. Instead, Airtable offers Date/Time specific formulas for these kinds of operations: