Notion Answers

Help between Notion users


Register & Ask

It's free & easy

Get answers

Answers, votes & comments

Vote and select answers

Receive points, vote and give the solution

Question

1vote

When each next day of the week is

I want to make a formula that shows when each next day of the week is (I have a database with "Monday", "Tuesday" and so on), so I can filter a view on my dashboard for "(next monday date) is today".

I've set up a start date using the Date property, and been trying to use this as a base:

dateAdd(prop("Start Date"), dateBetween(now(), prop("Start Date"), "day") + 1, "weeks")

The above formula returns the Start Date, but added by a week. I'm wondering if we'd be able to add not just 1 week, but subtract the "now" week and the Start Date property week to find out how many weeks to actually add. I tried it on this next formula but it also doesn't work completely (bugs some dates):

dateAdd(prop("Start Date"), dateBetween(now(), prop("Start Date"), "weeks") + dateBetween(now(), prop("Start Date"), "weeks"), "weeks")

Here's the link to the page I've been working on: https://absorbed-position-c49.notion.site/842f8195a73e4492a5b6b73fd6e94578?v=a80fa07f570b47cb89b8e78cbeb79358
I hope this makes sense lol

Thanks in advance.

2 Answers

0vote

nutsinbox Points320

Narumi-Nifuji from Reddit helped me with this formula, and it works as I needed:

if(dateAdd(prop("Start Date"), toNumber(dateBetween(now(), prop("Start Date"), "weeks")), "weeks") >= dateSubtract(now(), 1, "days") or dateAdd(prop("Start Date"), toNumber(dateBetween(now(), prop("Start Date"), "weeks")), "weeks") >= now(), dateAdd(prop("Start Date"), toNumber(dateBetween(now(), prop("Start Date"), "weeks")), "weeks"), dateAdd(prop("Start Date"), toNumber(dateBetween(now(), prop("Start Date"), "weeks") + 1), "weeks"))

0vote

polle Points94310

It may be easier to make it the other way around, instead of using the day name to get a date, use the date to get the day name.

Using your example, to show the next day based on the day you have in the Name column, you can create the column Tomorrow as a formula and add the following.

if(prop("Name") == "Monday", "Tuesday", if(prop("Name") == "Tuesday", "Wednesday", if(prop("Name") == "Wednesday", "Thursday", if(prop("Name") == "Thursday", "Friday", if(prop("Name") == "Friday", "Saturday", if(prop("Name") == "Saturday", "Sunday", if(prop("Name") == "Sunday", "Monday", "")))))))

That will check the text in Name and show the next one as you are trying to.

Just change "Name" to "Nome" in the formula to match your database.

0vote

nutsinbox commented

It really is a creative solution, but unfortunately this way doesn't allow the filtering. So my dashboard wouldn't show up what day today is (using the filter "where property is today").

Narumi-Nifuji from Reddit helped me with this formula, and it works as I needed:

if(dateAdd(prop("Start Date"), toNumber(dateBetween(now(), prop("Start Date"), "weeks")), "weeks") >= dateSubtract(now(), 1, "days") or dateAdd(prop("Start Date"), toNumber(dateBetween(now(), prop("Start Date"), "weeks")), "weeks") >= now(), dateAdd(prop("Start Date"), toNumber(dateBetween(now(), prop("Start Date"), "weeks")), "weeks"), dateAdd(prop("Start Date"), toNumber(dateBetween(now(), prop("Start Date"), "weeks") + 1), "weeks"))

1vote

polle commented

I just read again your Notion question and I truly don't know why I answered that, it is a completely different thing from what you asked. :) I saw what each next day of the week is.

Glad you got a solution, please share it in a new answer below and select it to mark the question as solved.

Please log in or register to answer this question.

...

Welcome to Notion Answers, where you can ask questions and receive answers from other members of the community.

Please share to grow the Notion Community!

Connect