⌚️ 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
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.”