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

Formula to check if time is now() ?

Hi everyone !
I’d like for a field to return a checkbox if the date AND time reflected in the « Date » column are equal to now(). However, I can’t seem to get anything to work.

I’ve tried:

formatDate(prop(" Date "), " LLLL ") == formatDate(now(), " LLLL ") 

(In this case, « L » and « LLL » work, but it stops working once I’ve added more L’s)

formatDate(prop(" Date "), " DD MM, YYYY, HH ") == formatDate(now(), " DD MM YYYY, HH ") 

(Again, in this case, it works until I add the HH)

formatDate(prop(" Date "), " DD MM, YYYY, HH:mm ") == formatDate(now(), " DD MM, YYYY, HH:mm ") 

(Same result as above)

My Date/time format is set up to full format, and generates dates as follows, for example: 3 november 2022 07:00-18:30

I can’t find any time formulas online that do what I want here, so I've just been throwing around different formulas, like above.

Would you guys perhaps know of a way to set this up ?

1 Answer

1vote

polle Points40070

You have to check if now is after the start time and before the end time, try this Notion formula.

if(now() > start(prop("Date")) and now() < end(prop("Date")), true, false)

Keep in mind spaces for property names in Notion matter, " Date " is not the same as "Date", so name your Notion properties properly to make things work.

Hope that helps.

0vote

deprechanel commented

Hi there !
Thank you so much - that formula worked! :D

Also, re: the " Date " thing - it was just a copying error here as I use French on my laptop and it automatically pastes French inverted commas, which I then edited out in the question post, but it left spaces. It's set up properly on Notion :)

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