By Alex Sherwood aka aNotioneer

<aside> 👋 This guide explains how to check whether a date is today, within X days or overdue, to highlight that info in a calendar of birthdays in this instance.

Notes starting with 💡 explain how a formula function works in Notion and notes starting with 📝 explain how a particular formula that I've created works.

If you have any questions, please feel free to add a comment or ask them here.

</aside>

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/0b59371d-63e4-4a70-84b1-e878b2ab8ff0/Screenshot_2019-10-09_at_23.08.34.png

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/82066c20-9e9d-4fba-b648-4c55de62773a/Screenshot_2019-10-09_at_22.57.59.png

Contents

<aside> 🚨 If you get an error message about a ‘syntax error’ when copying and pasting these formulas, try copying the ‘Unformatted formula’ from the toggle list instead.

</aside>

📖 Guide

Get number of days between two dates

💡 This formula will tell you that a date is 0 days away if it's tomorrow, 1 day away if it's the day after tomorrow etc. If you reverse the order of the dates that you're comparing then the formula will give you -1, rather than 1.

dateBetween(prop("Birthday"), now(), "days")

🔜 Birthday is in 30 days or less

if(and( dateBetween(prop("Birthday"), now(), "days") <= 29, dateBetween(prop("Birthday"), now(), "days") >= 0), "🔜", "")

Days until birthday