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

Updated formula to get date from title.

Hi,

this formula i found is no longer working I think since Notion did some updates on their formula language

dateAdd(dateAdd(dateAdd(dateSubtract(dateSubtract(dateSubtract(dateSubtract(dateSubtract(now(), year(now()), "years"), month(now()), "months"), date(now()) - 1, "days"), hour(now()), "hours"), minute(now()), "minutes"), toNumber(slice(prop("Name"), 6, 10)), "years"), toNumber(slice(prop("Name"), 0, 2)) - 1, "months"), toNumber(slice(prop("Name"), 3, 5)) - 1, "days")

Error:"Argument of type text does not satisfy function slice."

Would anybody be so kind to help me with this? Replacing slice with substring does not work either, equals empty value

0vote

polle commented

What is your title?

Please share exactly how are you writing it.

1vote

Didi commented

a date on the page's title, for instance 05-05-2022, on that format.
Thanks for answeing, I'd really appreciate it if you could help me

1 Answer

0vote

polle Points94140

I believe this is the Notion formula you are looking for.

dateAdd(dateAdd(dateAdd(dateSubtract(dateSubtract(dateSubtract(dateSubtract(dateSubtract(now(), year(now()), "years"), month(now()) - 1, "months"), date(now()) - 1, "days"), hour(now()), "hours"), minute(now()), "minutes"), toNumber(substring(prop("Name"), 6, 10)), "years"), toNumber(substring(prop("Name"), 0, 2)) - 1, "months"), toNumber(substring(prop("Name"), 3, 5)) - 1, "days")

Hope that helps.

0vote

Didi commented

It worked, It really helps a lot. Thank you very much Polle

0vote

polle commented

Glad to help!

Please select the answer to mark it 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