Notion Formula: Hours And Minutes Elapsed From Date Range

Screen Shot 2020-08-14 at 8.05.45 AM.png

⌚️ Time Elapsed

As a contract/freelance worker, tracking time worked is essential. As well, calculating clock-in and clock-out times for life tracking purposes can be useful. This formula will allow you to grab the total hours and minutes elapsed from a date range.

The Table Setup

Screen Shot 2020-08-14 at 8.18.32 AM.png

The Formula

format(dateBetween(end(prop("Clock-In Clock-out")), start(prop("Clock-In Clock-out")), "hours")) + "hr " + format(dateBetween(end(prop("Clock-In Clock-out")), start(prop("Clock-In Clock-out")), "minutes") % 60) + "min"

The Formula Breakdown

  • format(dateBetween(end(prop("Clock-In Clock-out")), start(prop("Clock-In Clock-out")), "hours")) - find hours between the end of date range and start of date range, and format the result into a text value.

  • + “hr ” - add text value “hr. ”

  • format(dateBetween(end(prop("Clock-In Clock-out")), start(prop("Clock-In Clock-out")), "minutes") % 60) - find minutes between the end of date range and start of date range, mod 60 to the result, and format into a text value.

  • + “min” - add text value “min.”

View Example In Notion