DEV Community

Cover image for Notion - Create a date range for current week (Mon-Sun)
Bosco Domingo
Bosco Domingo

Posted on • Edited on

Notion - Create a date range for current week (Mon-Sun)

To create a dynamic date range in Notion that spans the current week (Mon-Sun) at the time of use, you can use the following formula (substitute <Today> for the actual Today() function):

dateRange(dateSubtract(<Today>, <Today>.day()-1, "days"), dateAdd(<Today>, 7-<Today>.day(), "days"))
Enter fullscreen mode Exit fullscreen mode

What it does is simply to take the current date and find the difference to that week's Monday (by subtracting days) and to Sunday (by adding days).

To use it, simply chuck it into any formula input (such as in a Button that performs actions, or in Automations).

I personally suggest you create a variable (such as thisWeek) and reference that:

Showcase of the use of the formula for this week

Shameless plug: this comes from my Weekly Learning page, where I write about what I learn as I go. It's how I create new pages without having to manually set the weekly range. Quite convenient!

Top comments (0)