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

Same date for start and finish properties to result in an output of 1

There are two properties named Start and Finish. When I enter the same date in Finish and Start properties, the output is 0. If I select the Finish date as the day after the Start date, it appears as 1. However, I want the input to be 1 for both.

if(!empty(prop("Finish")), dateBetween(prop("Finish"), prop("Start"), "days"), toNumber(""))

This is how the formula starts. I would be glad if you help.

1 Answer

1vote

polle Points94270

You can add a compare to always show 1 if the two Notion properties have the same date.

if(prop("Start") == prop("Finish"), 1, if(!empty(prop("Finish")), dateBetween(prop("Finish"), prop("Start"), "days"), toNumber("")))

Hope that helps.

0vote

nhide commented

Thanks for the answer. However, when I use Formula, the output still appears as 1 even though Finish and Start are empty. How should I fix this?

1vote

polle commented

You have to then check if those are empty with something like this.

if(empty(prop("Start")) or empty(prop("Finish")), "", if(prop("Start") == prop("Finish"), 1, if(!empty(prop("Finish")), dateBetween(prop("Finish"), prop("Start"), "days"), toNumber(""))))

1vote

nhide commented

It worked! Thank you very much for helping.

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