Push Overdue Date to Today Formula
In the example above, there is a task database with a due date property, a done checkbox, and a formula named “Show In Calendar.” If there is a task that is in the past and NOT done, the due date will change to today. Otherwise, the date shown in the formula will display the original date.
if(prop("Done") == false and prop("Due Date") < now(), dateAdd(prop("Due Date"), dateBetween(now(), prop("Due Date"), "days"), "days"), prop("Due Date"))
This formula uses the if() operator to create the conditions explained for the formula to function.
if() syntax → if(boolean, true value, false value)
boolean == task that is in the past and NOT done
true value == the due date will change to today
false value == the date in the formula will display the original date
View Formula In Notion Calendar
To create a calendar view in an existing Notion database, navigate to the “+” button at the top of the database. Next, choose the Calendar layout. In this menu there is an option for Show calendar by. Choose the new date formula. This will join all past dates, future dates, and updated overdue dates in the same calendar.
Bonus: Late Status Formula
You may have noticed the “Late Status” formula in addition to the date formula. This will signal if a task with a due date and a done checkbox is Overdue, Due Today, Complete, or Due Later. Emojis are compatible with this code because it is returning a string property.
What you need
Date property named “Due Date”
Checkbox property named “Done”
if(not empty(prop("Due Date")), if(prop("Done"), "✅ Complete", if(formatDate(prop("Due Date"), "L") == formatDate(now(), "L"), "🚧 Due Today", if(prop("Due Date") < now() and prop("Done") == false, "❌ Overdue", "🗓 Due Later"))), "")