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

How to work with "fixed date" in a formula?

Hello all,

I am looking for a way to use fixed date in a formula.
I need to calculate number of days to a fixed date, e.d. December 31st, 2023. And I cannot find the correct syntax for entering the fixed date so that it does not end with "Type mismatch error".

Thanks :)

0vote

polle commented

Please extend a bit.

Type mismatch means you re not using a date and that is what you need.

What is your formula? What is the date? What are you expecting as a result? What are your columns? Etc...

Please share the complete scenario to understand the problem.

0vote

lukascypra commented

I have 1 column with date - e.g. Birthdate for a person, which differs for each record.
And I want to calculate, how many days are between the Birthdate (date type property) and a fixed date (December 31st 2023). How do I enter the fixed date in a formula that would go something like DateBetween("December 31st 2023", Birthdate, "days").
But the "December 31st 2023" obviously has to be written using different syntax, which I am not able to find anywhere...

Thanks

2 Answers

0vote

polle Points90800

Create another date column named Fixed to have the fixed date there.

Then use a Notion formula like this.

dateBetween(prop("Fixed"), prop("Birthday"), "days")

You will have the dates between the 2 dates as you need.

0vote

lukascypra commented

Cool thanks for your help :) I was looking for a way without creating another property, but it seems that it is almost impossible to enter a text in a "date" format into a formula. So creating new property will be the easiest way...

0vote

sev_estil Points180

Better use another property to indicate the date otherwise it's complex stuff like this: https://notionthings.com/2022/02/18/convert-text-to-actual-date/

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