Help between Notion users

It's free & easy

Receive points, vote and give the solution

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 Apr 1, 2023

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 Apr 1, 2023

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

0vote

polle Points79930

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 Apr 3, 2023

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/