Link Menu Expand Document

Productivity Software

Productivity Series · Lesson 1

Notion: Calculate Days Remaining

Build a dynamic due-date formula that automatically shows days remaining or days overdue.

Productivity Notion Formula

What to focus on while watching

  • How dateBetween and now() work together for date math.
  • How to handle blank due dates safely with conditional logic.
  • How to display clear, user-friendly status text in one property.

Latest Productivity Software

Practice: Due Date Formula

~6 min Beginner

Goal: Add one formula that shows both remaining and overdue day counts.

Steps

  1. Create a date property called Due Date.
  2. Create a formula property called Status.
  3. Paste the formula and test with past/future dates.

Expected Result

3 days remaining
2 days overdue
Need a hint? If nothing appears, confirm your property is exactly named Due Date.

Formula

if(
  empty(prop("Due Date")),
  "",
  format(abs(ceil(dateBetween(prop("Due Date"), now(), "hours") / 24))) +
  if(
    dateBetween(prop("Due Date"), now(), "hours") >= 0,
    " days remaining",
    " days overdue"
  )
)