Time Formatting With Notion Formulas
Using Notion to enhance productivity?
Do you want to be able to return specific dates and times? In the 3 examples below I explore how a Notion user can find the days, hours and minutes between various date property types using a formula.
Find Hours And Minutes Between Two Date Properties
format(dateBetween(prop("End Date"), prop("Start Date"), "hours")) + "h:" + format(dateBetween(prop("End Date"), prop("Start Date"), "minutes") % 60) + "m"
Find Hours And Minutes Between A Date Range
format(dateBetween(end(prop("Date Range Today")), start(prop("Date Range Today")), "hours")) + "h:" + format(dateBetween(end(prop("Date Range Today")), start(prop("Date Range Today")), "minutes") % 60) + "m"
Find Days, Hours And Minutes Between A Date Range
format(dateBetween(end(prop("Date Range Multiple Days")), start(prop("Date Range Multiple Days")), "days")) + "dys " + format(dateBetween(end(prop("Date Range Multiple Days")), start(prop("Date Range Multiple Days")), "hours") % 24) + "h:" + format(dateBetween(end(prop("Date Range Multiple Days")), start(prop("Date Range Multiple Days")), "minutes") % 60) + "m"