πŸ”

Time Formatting With Notion Formulas

Created
Jan 25, 2021 08:15 PM
↙️
Hi, Hello! My name is Sarah - the writer behind redgregory.com.
notion image
Are you 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.
βž•
Time formatting with "dateBetween" function tip: start this function with the date further away. For instance, if there are two date properties, one for a start date and one for an end date, start with the end date. ex. dateBetween(prop("End Date"), prop("Start Date"), "days")

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"
Ways To Time Format
Name
Start Date
End Date
Formula (h,m)1
β€£
β€£

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"
Ways To Time Format
Name
Date Range Today
Formula (h,m)2
β€£

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"
Ways To Time Format
Name
Date Range Multiple Days
Formula (d,h,m)
β€£
Β 
Formulas can be scary for new users so let me explain the functions I used here.
What is the dateBetween function?
  • This function finds the value between two dates. That value can be days between a start date and a deadline, hours between two clock-in times, etc.
What is the format function?
  • This function wraps around a number value to convert into text. With format I can then add text characters like ":" and "#h:#m" to a calculation.

My Mood

Highest Performing Tweet

Content Published This Week

Video preview