can i format teh results of datebetween into years and months?
Connect
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
2 Answers
See if this helps. I couldn't think of a way that keeps the month and the year, but there's a way to show up the months:
concat(format(abs(dateBetween(prop("Start date"), prop("End date"), "months"))) + " months")
Or even, if you just want the number:
abs(dateBetween(prop("Start date"), prop("End date"), "months"))
Hi, this formula will give you Years and Months between the set dates.
E.g. if the "Start date" was December 4th 2020 and the "End date" was July 17th 2023 the result would show:
3 Years 7 Months
concat(format(abs(floor(dateBetween(prop("Start date"), prop("End date"), "months") / 12))), " Years ", format(abs(mod(dateBetween(prop("Start date"), prop("End date"), "months"), 12))), " Months")
Related questions
- Countdown (Years, Months, Weeks, Days, Hours, and Minutes)
- Same date for start and finish properties to result in an output of 1
- Counting the number of days in a date range based on the year (how to split day between 2023 and 2024)
- Using start() and end() nested in if function nested in dateBetween function
- Months and years Notion calendar database
Without Answer
-
- 24
- 1
- 2 days ago
-
- 122
- 1
- Nov 15
-
- 166
- 1
- Sep 6
-
- 580
- 0
- Aug 10
-
- 231
- 1
- Jun 21
-
- 380
- 1
- Jun 8
-
- 252
- 1
- May 29
-
- 493
- 1
- Apr 25
- see all
Exclusive for Notion Answers Users
- • Dynamic Calendar Icon | Info | Download
- Add yours here
Recent Activities
Yogane asked 2 days ago
How can I get a time line in years instead of mont…polle answered 3 days ago
is it possible to calculate a database item in one…YannSchell asked 3 days ago
is it possible to calculate a database item in one…polle commented 5 days ago
Is it possible to sum every entry's number propert…TommyFFX selected an answer 5 days ago
Is it possible to sum every entry's number propert…
...