Days between two dates in Notion (dateBetween)
dateBetween(prop("Due"), today(), "days")
dateBetween(a, b, unit) returns a minus b in whole units. Put the later date first to get a positive number. Units: "years", "quarters", "months", "weeks", "days", "hours", "minutes".
Why is my count off by one?
- now() includes the time. At noon, a due date tomorrow at midnight is only 12 hours away, which is 0 whole days. Use
today()for day counts. - Whole units only. Partial units are dropped, so 6.5 days counts as 6.
- Date ranges: use
dateStart(prop("When"))ordateEnd(...)to pick a side.
"3 days left" / "2 days overdue"
lets(d, dateBetween(prop("Due"), today(), "days"),
ifs(d > 0, format(d) + " days left", d == 0, "Due today", format(abs(d)) + " days overdue"))
+ turns a number into text when the other side is text, so d + " days left" works too. format() just makes it explicit and keeps the result text even when d is the only value.
Adding time to a date
dateAdd(prop("Start"), 2, "weeks")
prop("Start").dateAdd(30, "days").formatDate("MMM D, YYYY")
Practice it
Play with it
In the gym, today is Mon Nov 23, 2026.