80 Notion Formulas To Copy

80 Notion Formulas To Copy

image

Dates

Date Relating To Now

Date Is Today
Properties required (Name: type of property)
  • Date: date
formatDate(prop("Date"), "L") == formatDate(now(), "L")
Date Is Tomorrow
Properties required (Name: type of property)
  • Date: date
formatDate(dateAdd(now(), 1, "days"), "L") == formatDate(prop("Date"), "L")
Date Is Before Or On Today
Properties required (Name: type of property)
  • Date: date
now() > prop("Date")
Date Is Before Today
Properties required (Name: type of property)
  • Date: date
now() > prop("Date") and formatDate(prop("Date"), "L") != formatDate(now(), "L")
Date Is After Today
Properties required (Name: type of property)
  • Date: date
now() < prop("Date")
Date Is After Or On Today
Properties required (Name: type of property)
  • Date: date
formatDate(now(), "L") == formatDate(prop("Date"), "L") or now() < prop("Date")
Date Is In Current Month
Properties required (Name: type of property)
  • Date: date
formatDate(prop("Date"), "M") == formatDate(now(), "M")
Date Is In Current Quarter
Properties required (Name: type of property)
  • Date: date
formatDate(prop("Date"), "Q") == formatDate(now(), "Q")
Date Lands In This Week (week starts on monday)
Properties required (Name: type of property)
  • Date: date
formatDate(prop("Date"), "W") == formatDate(now(), "W")
Date Lands In This Week (week starts on sunday)
Properties required (Name: type of property)
  • Date: date
formatDate(prop("Date"), "w") == formatDate(now(), "w")
Today Falls Within Date-Range
Properties required (Name: type of property)
  • Date: date
now() > start(prop("Date-Range")) and now() < end(prop("Date-Range")) or or(formatDate(now(), "L") == formatDate(start(prop("Date-Range")), "L"), formatDate(now(), "L") == formatDate(end(prop("Date-Range")), "L"))

Date Calculations

*Replace prop("Date") w/ now() to return formulas relating to today

Find Month And Return First Day Of Month
Properties required (Name: type of property)
  • Date: date
dateSubtract(prop("Date"), date(prop("Date")) - 1, "days")
Find Month And Return Last Day Of Month
Properties required (Name: type of property)
  • Date: date
dateSubtract(dateAdd(dateSubtract(prop("Date"), date(prop("Date")) - 1, "days"), 1, "months"), 1, "days")
Week # Of The Month (week starts on monday)
Properties required (Name: type of property)
  • Date: date
ceil((date(prop("Date")) + day(dateSubtract(prop("Date"), date(prop("Date")) - 1, "days")) - 1) / 7)
Week # Of The Month (week starts on sunday)
Properties required (Name: type of property)
  • Date: date
ceil((date(prop("Date")) + day(dateSubtract(prop("Date"), date(prop("Date")) - 1, "days"))) / 7)
Find Age From Birthday
Properties required (Name: type of property)
  • DOB: date
if(not empty(prop("DOB")), format(dateBetween(now(), prop("DOB"), "years")) + " Years Old", "")
Total Days In Date's Month
Properties required (Name: type of property)
  • Date: date
date(dateSubtract(dateAdd(dateSubtract(prop("Date"), date(prop("Date")) - 1, "days"), 1, "months"), 1, "days"))
Find Hours And Minutes Between Date-Range
Properties required (Name: type of property)
  • Date-Range: date
format(dateBetween(end(prop("Date-Range")), start(prop("Date-Range")), "hours")) + " hr " + format(dateBetween(end(prop("Date-Range")), start(prop("Date-Range")), "minutes") % 60) + " min"
Find Hours And Minutes Between Two Dates
Properties required (Name: type of property)
  • Start Date: date
  • End Date: date
format(dateBetween(prop("End Date"), prop("Start Date"), "hours")) + " hr " + format(dateBetween(prop("End Date"), prop("Start Date"), "minutes") % 60) + " min"

Format Dates

Format Weekday
Properties required (Name: type of property)
  • Date: date
formatDate(prop("Date"), "dddd")
Format Month
Properties required (Name: type of property)
  • Date: date
formatDate(prop("Date"), "MMMM")
Format Quarter
Properties required (Name: type of property)
  • Date: date
formatDate(prop("Date"), "Q")
Format Time Of Day (AM/PM)
Properties required (Name: type of property)
  • Date: date
formatDate(prop("Date"), "A")
Format Time Of Day (ie. morning)
Properties required (Name: type of property)
  • Date: date
if(hour(prop("Date")) == 0, "", if(hour(prop("Date")) < 12, "Morning", if(hour(prop("Date")) < 17, "Afternoon", if(hour(prop("Date")) < 25, "Evening", ""))))
Format Date (M/D/YYYY)
Properties required (Name: type of property)
  • Date: date
formatDate(prop("Date"), "l")
Format Date and Time (MMM D, YYYY h:mm A )
Properties required (Name: type of property)
  • Date: date
formatDate(prop("Date"), "lll")
Format Full Time (h:mm A)
Properties required (Name: type of property)
  • Date: date
formatDate(prop("Date"), "LT")
Format Timezone
Properties required (Name: type of property)
  • Date: date
formatDate(prop("Date"), "z")
Format Day # Of The Year
Properties required (Name: type of property)
  • Date: date
formatDate(prop("Date"), "DDD")

Date Use-Cases

Super Minimal Deadline
Properties required (Name: type of property)
  • Deadline: date
  • Done: checkbox
if(prop("Done"), "\t★", if(formatDate(prop("Deadline"), "MDYYYY") == formatDate(now(), "MDYYYY"), "\t☆", if(now() < prop("Deadline"), "\t→", if(prop("Deadline") < now(), "\t⚠︎", ""))))
Find Season From Date (Northern Hemishpere)
Properties required (Name: type of property)
  • Date: date
if(toNumber(formatDate(prop("Date"), "DDD")) < 80, "🧤 Winter", if(toNumber(formatDate(prop("Date"), "DDD")) < 172, "🌷 Spring", if(toNumber(formatDate(prop("Date"), "DDD")) < 264, "🌞 Summer", if(toNumber(formatDate(prop("Date"), "DDD")) > 354 and toNumber(formatDate(prop("Date"), "DDD")) < 367, "🧤 Winter", "🍁 Fall"))))
Find Season From Date (Southern Hemishpere)
Properties required (Name: type of property)
  • Date: date
if(toNumber(formatDate(prop("Date"), "DDD")) < 80, "🌞 Summer", if(toNumber(formatDate(prop("Date"), "DDD")) < 172, "🍁 Fall", if(toNumber(formatDate(prop("Date"), "DDD")) < 264, "🧤 Winter", if(toNumber(formatDate(prop("Date"), "DDD")) > 354 and toNumber(formatDate(prop("Date"), "DDD")) < 367, "🌞 Summer", "🌷 Spring"))))

Text

Format Text

Convert Lowercase To Uppercase
Properties required (Name: type of property)
  • Name: Text
replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(prop("Name"), "a", "A"), "b", "B"), "c", "C"), "d", "D"), "e", "E"), "f", "F"), "g", "G"), "h", "H"), "i", "I"), "j", "J"), "k", "K"), "l", "L"), "m", "M"), "n", "N"), "o", "O"), "p", "P"), "q", "Q"), "r", "R"), "s", "S"), "t", "T"), "u", "U"), "v", "V"), "w", "W"), "x", "X"), "y", "Y"), "z", "Z")
Convert Uppercase To Lowercase
Properties required (Name: type of property)
  • Name: Text
replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(replaceAll(prop("Name"), "A", "a"), "B", "b"), "C", "c"), "D", "d"), "E", "e"), "F", "f"), "G", "g"), "H", "h"), "I", "i"), "J", "j"), "K", "k"), "L", "l"), "M", "m"), "N", "n"), "O", "o"), "P", "p"), "Q", "q"), "R", "r"), "S", "s"), "T", "t"), "U", "u"), "V", "v"), "W", "w"), "X", "x"), "Y", "y"), "Z", "z")

Extract Text

Extract First Name (john smith)
Properties required (Name: type of property)
  • Name: Text
replace(prop("Name"), "[ ].*", "")
Extract Last Name (john smith)
Properties required (Name: type of property)
  • Name: Text
replace(prop("Name"), ".*[ ]", "")
Extract All Numbers From Text
Properties required (Name: type of property)
  • Name: Text
replaceAll(prop("Name"), "[^0-9]", "")

Alternative

toNumber(prop("Name"))
Extract All Non-Numbers From Text
Properties required (Name: type of property)
  • Name: Text
replaceAll(prop("Name"), "[^A-z]", "")
Extract All Characters After A Special Character
Properties required (Name: type of property)
  • Name: Text
replaceAll(prop("Name"), ".*[:] ", "")
Extract All Characters Before A Special Character
Properties required (Name: type of property)
  • Name: Text
replaceAll(prop("Name"), "[:].+", "")
Remove All Special Characters
Properties required (Name: type of property)
  • Name: Text
replaceAll(prop("Name"), "[!@#$%^&*]", " ")
Extract All Text Between Two Characters (example: text between parenthesis)
Properties required (Name: type of property)
  • Name: Text
replaceAll(replace(prop("Name"), "[^(]*[(]", ""), "[)][^)]*$", "")
Find Number Of Tags/Relations
Properties required (Name: type of property)
  • Tags: Multi-Select or Relation
if(not empty(prop("Tags")), length(replaceAll(prop("Tags"), "[^,]", "")) + 1, 0)

Extract From URL

Extract Name Of Website
Properties required (Name: type of property)
  • URL: URL
replaceAll(replaceAll(prop("Url"), ".*?www.", ""), "[.].*", "")
Extract Twitter Handle (@johnsmith)
Properties required (Name: type of property)
  • URL: URL
replace(replace(prop("URL"), "/status/.*", ""), ".*.com/", "")

Numbers

Round Numbers

Round To Nearest .01
Properties required (Name: type of property)
  • Number: Number
round(100 * prop("Number")) / 100
Round To Nearest .1
Properties required (Name: type of property)
  • Number: Number
round(10 *prop("Number")) / 10
Round To Nearest .5
Properties required (Name: type of property)
  • Number: Number
round(prop("Number") / .5) * .5
Round To Nearest 1
Properties required (Name: type of property)
  • Number: Number
round(prop("Number"))
Round To Nearest 5
Properties required (Name: type of property)
  • Number: Number
round(prop("Number") / 5) * 5
Round To Nearest 10
Properties required (Name: type of property)
  • Number: Number
round(prop("Number") / 10) * 10
Round To Nearest 25
Properties required (Name: type of property)
  • Number: Number
round(prop("Number") / 25) * 25

Convert To Number

If Checkbox Is True, Return 1 ... If False, Return 0
Properties required (Name: type of property)
  • Habit: Checkbox
unaryPlus(prop("Habit"))
Convert Text To Number
Properties required (Name: type of property)
  • Name: Text
toNumber(prop("Name"))

Progress Bars

Progress Bar Designs

Diamond Progress Bar
Properties required (Name: type of property)
  • Read: Number
  • Total Pages: Number
if(not empty(prop("Read")) and not empty(prop("Total Pages")), slice("◆◆◆◆◆◆◆◆◆◆", 0, floor(10 * prop("Read") / prop("Total Pages"))) + "" + slice("◇◇◇◇◇◇◇◇◇◇", 0, 10 - floor(10 * prop("Read") / prop("Total Pages"))) + " " + format(floor(100 * prop("Read") / prop("Total Pages"))) + "%", "")
Block Progress Bar
Properties required (Name: type of property)
  • Read: Number
  • Total Pages: Number
if(not empty(prop("Read")) and not empty(prop("Total Pages")), slice("■■■■■■■■■■", 0, floor(10 * prop("Read") / prop("Total Pages"))) + slice("⃞⃞⃞⃞⃞⃞⃞⃞⃞⃞", 0, 10 - floor(10 * prop("Read") / prop("Total Pages"))) + " " + format(floor(100 * prop("Read") / prop("Total Pages"))) + "%", "")
Bold Bars Progress Bar
Properties required (Name: type of property)
  • Read: Number
  • Total Pages: Number
if(not empty(prop("Read")) and not empty(prop("Total Pages")), slice("▌▌▌▌▌▌▌▌▌▌", 0, floor(10 * prop("Read") / prop("Total Pages"))) + format(floor(100 * prop("Read") / prop("Total Pages"))) + "%", "")
Thin Bars Progress Bar
Properties required (Name: type of property)
  • Read: Number
  • Total Pages: Number
if(not empty(prop("Read")) and not empty(prop("Total Pages")), slice("||||||||||||||||||||", 0, floor(20 * prop("Read") / prop("Total Pages"))) + "🁢 " + format(floor(100 * prop("Read") / prop("Total Pages"))) + "%", "")
Lines Progress Bar
Properties required (Name: type of property)
  • Read: Number
  • Total Pages: Number
if(not empty(prop("Read")) and not empty(prop("Total Pages")), slice("▮▮▮▮▮▮▮▮▮▮", 0, floor(10 * prop("Read") / prop("Total Pages"))) + slice("▯▯▯▯▯▯▯▯▯▯", 0, 10 - floor(10 * prop("Read") / prop("Total Pages"))) + " " + format(floor(100 * prop("Read") / prop("Total Pages"))) + "%", "")
Plain Circle Progress Bar
Properties required (Name: type of property)
  • Read: Number
  • Total Pages: Number
if(not empty(prop("Read")) and not empty(prop("Total Pages")), slice("⭘⭘⭘⭘⭘⭘⭘⭘⭘⭘", 0, floor(10 * prop("Read") / prop("Total Pages"))) + " " + format(floor(100 * prop("Read") / prop("Total Pages"))) + "%", "")
Dotted Progress Bar
Properties required (Name: type of property)
  • Read: Number
  • Total Pages: Number
if(not empty(prop("Read")) and not empty(prop("Total Pages")), slice("፨፨፨፨፨፨፨፨፨፨", 0, floor(10 * prop("Read") / prop("Total Pages"))) + "" + format(floor(100 * prop("Read") / prop("Total Pages"))) + "%", "")
Bubbles Progress Bar
Properties required (Name: type of property)
  • Read: Number
  • Total Pages: Number
if(not empty(prop("Read")) and not empty(prop("Total Pages")), slice("⬤⬤⬤⬤⬤⬤⬤⬤⬤⬤", 0, floor(10 * prop("Read") / prop("Total Pages"))) + slice("◯◯◯◯◯◯◯◯◯◯", 0, 10 - floor(10 * prop("Read") / prop("Total Pages"))) + " " + format(floor(100 * prop("Read") / prop("Total Pages"))) + "%", "")
Levels Progress Bar
Properties required (Name: type of property)
  • Read: Number
  • Total Pages: Number
if(not empty(prop("Read")) and not empty(prop("Total Pages")), slice("⠤⠴⠾⠿⠿⠿⠿⠿⠿⠿", 0, floor(10 * prop("Read") / prop("Total Pages"))) + " " + format(floor(100 * prop("Read") / prop("Total Pages"))) + "%", "")

Slider Designs

Cube Slider Bar
Properties required (Name: type of property)
  • Read: Number
  • Total Pages: Number
if(not empty(prop("Read")) and not empty(prop("Total Pages")), slice("❒❒❒❒❒❒❒❒❒❒", 0, floor(10 * prop("Read") / prop("Total Pages"))) + "" + slice("❒❒❒❒❒❒❒❒❒❒", 0, 10 - floor(10 * prop("Read") / prop("Total Pages"))) + " " + format(floor(100 * prop("Read") / prop("Total Pages"))) + "%", "")
Classic Slider Bar
Properties required (Name: type of property)
  • Read: Number
  • Total Pages: Number
if(not empty(prop("Read")) and not empty(prop("Total Pages")), slice("——————————", 0, floor(10 * prop("Read") / prop("Total Pages"))) + "" + slice("——————————", 0, 10 - floor(10 * prop("Read") / prop("Total Pages"))) + " " + format(floor(100 * prop("Read") / prop("Total Pages"))) + "%", "")
Loading Slider Bar
Properties required (Name: type of property)
  • Read: Number
  • Total Pages: Number
if(not empty(prop("Read")) and not empty(prop("Total Pages")), slice("▒▒▒▒▒▒▒▒▒▒", 0, floor(10 * prop("Read") / prop("Total Pages"))) + "|" + slice("░░░░░░░░░░", 0, 10 - floor(10 * prop("Read") / prop("Total Pages"))) + " " + format(floor(100 * prop("Read") / prop("Total Pages"))) + "%", "")
Thin Slider Bar
Properties required (Name: type of property)
  • Read: Number
  • Total Pages: Number
if(not empty(prop("Read")) and not empty(prop("Total Pages")), slice("||||||||||||||||||||", 0, floor(20 * prop("Read") / prop("Total Pages"))) + "🁢" + slice("||||||||||||||||||||", 0, 20 - floor(20 * prop("Read") / prop("Total Pages"))) + " " + format(floor(100 * prop("Read") / prop("Total Pages"))) + "%", "")
Raised Disk Slider Bar
Properties required (Name: type of property)
  • Read: Number
  • Total Pages: Number
if(not empty(prop("Read")) and not empty(prop("Total Pages")), slice("❍❍❍❍❍❍❍❍❍❍", 0, floor(10 * prop("Read") / prop("Total Pages"))) + "" + slice("❍❍❍❍❍❍❍❍❍❍", 0, 10 - floor(10 * prop("Read") / prop("Total Pages"))) + " " + format(floor(100 * prop("Read") / prop("Total Pages"))) + "%", "")
Floating Slider Bar
Properties required (Name: type of property)
  • Read: Number
  • Total Pages: Number
if(not empty(prop("Read")) and not empty(prop("Total Pages")), slice("▁▁▁▁▁▁▁▁▁▁", 0, floor(10 * prop("Read") / prop("Total Pages"))) + "" + slice("▁▁▁▁▁▁▁▁▁▁", 0, 10 - floor(10 * prop("Read") / prop("Total Pages"))) + " " + format(floor(100 * prop("Read") / prop("Total Pages"))) + "%", "")
8-Bit Slider Bar
Properties required (Name: type of property)
  • Read: Number
  • Total Pages: Number
if(not empty(prop("Read")) and not empty(prop("Total Pages")), slice("▄▄▄▄▄▄▄▄▄▄", 0, floor(10 * prop("Read") / prop("Total Pages"))) + "" + slice("▄▄▄▄▄▄▄▄▄▄", 0, 10 - floor(10 * prop("Read") / prop("Total Pages"))) + " " + format(floor(100 * prop("Read") / prop("Total Pages"))) + "%", "")
Lite Floating Slider Bar
Properties required (Name: type of property)
  • Read: Number
  • Total Pages: Number
if(not empty(prop("Read")) and not empty(prop("Total Pages")), slice("__________", 0, floor(10 * prop("Read") / prop("Total Pages"))) + "▃" + slice("__________", 0, 10 - floor(10 * prop("Read") / prop("Total Pages"))) + " " + format(floor(100 * prop("Read") / prop("Total Pages"))) + "%", "")

Unique Progress Bars

Weekly Progress Indicator From Date (Su-Sa)
Properties required (Name: type of property)
  • Date: Date
slice("◻️◻️◻️◻️◻️◻️◻️", 0, day(prop("Date")) * 2) + "🔲" + slice("◼️◼️◼️◼️◼️◼️◼️", 1, 14 - day(prop("Date")) * 2)
Weekly Progress Indicator From Date (Mo-Su)
Properties required (Name: type of property)
  • Date: Date
if(day(prop("Date")) != 0, slice("◻️◻️◻️◻️◻️◻️◻️", 0, (day(prop("Date")) - 1) * 2) + "🔲" + slice("◼️◼️◼️◼️◼️◼️◼️", 1, 14 - (day(prop("Date")) - 1) * 2), "◻️◻️◻️◻️◻️◻️🔲")
Double-Progress Bar
Properties required (Name: type of property)
  • Date Range: Date
  • Pages: Number
  • Page On: Number
if(not empty(prop("Pages")) and not empty(prop("Date Range")), "Progress: " + format(slice("‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒", 0, floor(20 * prop("Page On") / prop("Pages"))) + "📗" + slice("‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒", 0, 20 - floor(20 * prop("Page On") / prop("Pages"))) + " " + format(floor(100 * prop("Page On") / prop("Pages"))) + "%") + "\nDeadline: " + format(if(dateBetween(start(prop("Date Range")), now(), "days") > 0, "⭕‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒ 0%", if(dateBetween(end(prop("Date Range")), now(), "days") > -1, slice("‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒", 0, floor(20 * dateBetween(now(), start(prop("Date Range")), "days") / dateBetween(end(prop("Date Range")), start(prop("Date Range")), "days"))) + "" + slice("‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒", 0, 20 - floor(20 * dateBetween(now(), start(prop("Date Range")), "days") / dateBetween(end(prop("Date Range")), start(prop("Date Range")), "days"))) + " " + format(floor(100 * dateBetween(now(), start(prop("Date Range")), "days") / dateBetween(end(prop("Date Range")), start(prop("Date Range")), "days"))) + "%", "‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒‒⭕ 100%"))), "")
Progress Of Current Year
Properties required (Name: type of property)
  • None!
if(10 * toNumber(formatDate(now(), "DDD")) / 365 < 1, "▒░░░░░░░░░ " + format(floor(100 * toNumber(formatDate(now(), "DDD")) / 365)) + "%", if(year(now()) % 4 == 0, slice("▒▒▒▒▒▒▒▒▒▒", 0, 10 * toNumber(formatDate(now(), "DDD")) / 366) + slice("░░░░░░░░░░", 10 * toNumber(formatDate(now(), "DDD")) / 366) + " " + format(floor(100 * toNumber(formatDate(now(), "DDD")) / 366)) + "%", slice("▒▒▒▒▒▒▒▒▒▒", 0, 10 * toNumber(formatDate(now(), "DDD")) / 365) + slice("░░░░░░░░░░", 10 * toNumber(formatDate(now(), "DDD")) / 365) + " " + format(floor(100 * toNumber(formatDate(now(), "DDD")) / 365)) + "%"))
Progress Of Current Week
Properties required (Name: type of property)
  • None!
if(day(now()) == 0, "▒▒▒▒▒▒▒▒▒▒ 100% ", slice("▒▒▒▒▒▒▒▒▒▒", 0, 10 * day(now()) / 7) + slice("░░░░░░░░░░", 10 * day(now()) / 7) + " " + format(floor(100 * day(now()) / 7)) + "%")
Progress Of Current Day
Properties required (Name: type of property)
  • None!
if(10 * hour(now()) / 24 < 1, "▒░░░░░░░░░ " + format(floor(100 * hour(now()) / 24)) + "%", slice("▒▒▒▒▒▒▒▒▒▒", 0, 10 * hour(now()) / 24) + slice("░░░░░░░░░░", 10 * hour(now()) / 24) + " " + format(floor(100 * hour(now()) / 24)) + "%")

Other

Files & Media

Find File Type (One File)
Properties required (Name: type of property)
  • File: Files & Media
replaceAll(prop("File"), ".*[?!^.]", "")

Empty Cell

If Another Cell Is Empty, Return Alert
Properties required (Name: type of property)
  • Name: Text
if(empty(prop("Name")), "This cell is empty", "")
If Another Cell Is Not Empty, Return Alert
Properties required (Name: type of property)
  • Name: Text
if(not empty(prop("Name")), "This cell is not empty", "")

🔗

Blog