Help between Notion users

It's free & easy

### Vote and select answers

Receive points, vote and give the solution

1vote

# Countdown (Years, Months, Weeks, Days, Hours, and Minutes)

Someone help me with a code to countdown Years, Months, Weeks, Days, Hours and Minutes in a single formula property and a single date property (using the ranges as well)

1vote

polle Points46140

You can use a Notion formula like this:

``format(dateBetween(prop("Date"), now(), "years")) + "y " + format(dateBetween(prop("Date"), now(), "months")) + "m " + format(dateBetween(prop("Date"), now(), "days")) + "d " + format(dateBetween(prop("Date"), now(), "hours") % 24) + "h " + format(dateBetween(prop("Date"), now(), "minutes") % 60) + "m"``

Use Date for your Notion property name and it will work as you need.

1vote

### Elpepe commented Feb 28

Do you think this formula is right? I based on yours

``if(empty(prop("Date")), "", replace(format(dateBetween(end(prop("Date")), now(), "years")) + " y ┃ ", "^0 y ┃ ", "") + replace(format(dateBetween(end(prop("Date")), now(), "months") % 12) + " m ┃ ", "^0 m ┃ ", "") + replace(format(round(dateBetween(end(prop("Date")), now(), "weeks") % 4.3452381)) + " w ┃ ", "^0 w ┃ ", "") + replace(format(dateBetween(end(prop("Date")), now(), "days") % 7) + " d ┃ ", "^0 d ┃ ", "") + replace(format(dateBetween(end(prop("Date")), now(), "hours") % 24) + " h ┃ ", "^0 h ┃ ", "") + replace(format(dateBetween(end(prop("Date")), now(), "minutes") % 60) + " min", "^0 min", ""))``

1vote

### polle commented Mar 1

Sure thing, removing empty and showing it differently is ok if it does the job. :)

If you believe my answer is the solution, please select it to mark the question as solved.

### Extend Notion Powers

...

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!