Links

Data Types

Learn about the four data types supported in Notion formulas.
Notion formulas can accept (and return) four different types of data: String, Number, Boolean (aka Checkbox), and Date.
Data Type
Examples
String
"King of the Pirates"
Number
9001
Boolean (called Checkbox in Notion)
true, false
Date
"2022-11-11T12:00:00Z"
Notion formulas almost never do automatic type conversion; you must convert data to other types manually. Learn how to do that here:
The only exceptions to this are within the test, replace, and replaceAll functions, which do limited automatic type conversion. These are advanced functions, so I won't cover their details here.
This fact has several implications:
First, a formula must output data of a single type. The following will throw a Type Mismatch error:
1
// Type Mismatch
2
"Monkey D. Luffy is " + 19 + " years old."
You'll need to convert the number to a string in order to make this formula work
1
// Valid
2
"Monkey D. Luffy is " + format(19) + " years old."
Now the formula is outputting string data only.
Second, operators must have operands of the same type, and arguments within functions must be of the type specified by the function.
1
// Type Mismatch
2
"42" == 42
3
4
// Valid - unaryPlus operator (+) converts the string to a number
5
+"42" == 42
6
7
// Also valid - format() converts 42 to a string
8
"42" == format(42)
9
10
---
11
12
// Type Mismatch - dateBetween's first and second arguments must be dates, not simply strings containing representations of dates
13
dateBetween("June 1, 2022", "June 30, 2022", "days")
14
15
// Valid - the function is now using dates in its first two arguments (assume a date property called "Date" exists)
16
dateBetween(prop("Date"), now(), "days")
Good to know: Since Notion formulas don't do automatic type conversion, the equals (==) operator tests for strict equality (see the JavaScript reference page on this).
E.g. "1" == 1 will throw a Type Mismatch error in Notion. In JavaScript, it would return true.

About the Author

My name is Thomas Frank, and I'm a Notion-certified writer, YouTuber, and template creator. I've been using Notion since 2018 to organize my personal life and to run my business and YouTube channel. In addition to this formula reference, I've created a free Notion course for beginners and several productivity-focused Notion templates. If you'd like to connect, follow me on Twitter.