Today we are going to learn how to convert text to a number in Notion.
Finding the number from a text in Notion is a really simple task. This can be accomplished with the use of a unaryPlus operator in Notion.
In order to find the number from a text in a 1 database, we will follow a 3-step approach as follows:
- We need to create a database to hold the data to find the number from a text.
- Set up the database correctly.
- Put the desired formula that will help us find the number from a text.
How to create a database in Notion? (Step 1)
Before creating a database, let’s first understand what is a database.
What is a database in Notion?
In Notion, a database is a collection of data that can be structured and organized in a variety of ways. It’s a powerful feature that allows users to create custom databases to store, manage, and track information in a structured and organized manner.
A Notion database is made up of a collection of properties that define the different types of data that can be stored within it.
These properties can include text, numbers, dates, formulas, attachments, checkboxes, and more.
Databases in Notion can be customized to suit a variety of needs, including
- project management,
- task tracking,
- inventory management,
- customer relationship management, and more.
They can be organized into tables and viewed in a variety of formats, including
- calendars, and
- Kanban boards.
Overall, databases in Notion provide a flexible and powerful way to organize and manage information, making it a popular tool for individuals and teams across a wide range of industries and use cases.
Simply said, a database will help to hold the values of data inside it through which we can perform any operation.
How to create a database in Notion?
In order to add a database in Notion, simply type “/database” and you will get a list of options for adding a database in Notion.
Select “Database – Inline” and you can add a database to your Notion page quickly.
Next, we will set up the database correctly to find the number from a text in Notion.
Setting up the database correctly (Step:2)
In any database that you ever create, there will always be a default property which is the first column of the database.
This property will always have the “Type” as “Title” which can’t be changed.
In this example, we are writing the Operator name in use in the first column, i.e. unaryPlus(). Thus we will name the first property as Operator which is shown below.
Here’s what we will require in our database to convert text to a Number in Notion in the database.
First, we need to add the following 4 properties to the database to convert the text to a number in a database:
|Property Name||Property Type|
|No 1 [unaryPlus()]||Formula|
|No 1 [toNumber()]||Formula|
We will talk about each property in the following section.
How to add properties in a database in Notion to convert the text to a number?
In order to add a new property, we need to click on the “+” sign at the top right corner of a database.
Once selected, you will get a list of options to choose from to select the property type.
Select the “Number” property and name it “No 1”. We will be able to create a No 1 property as shown below.
Next up, we will add 2 formulas to convert the text to a number in Notion. This will have “Formula” as the type of property that will help us do the necessary calculations.
Now, it’s time to implement the formula to convert text to a number in Notion.
Formula to convert the text to a number in Notion (Step: 3)
Once our database is set up, we need to figure out which formula to use to convert the text to a number in Notion.
Use of the unaryPlus function to convert the text to a number in Notion (Formula: 1)
In this formula, we will find the number from a text by using the unaryPlus operator.
For finding the number from a text, Notion has a built-in operator, i.e. unaryPlus().
Essentially, the unaryPlus operator helps to find the number from a text in Notion, when we provide an input of a text which seems to be a number inside the operator.
unaryPlus (“5”) = 5
Now in order to find the number from the text, we would use the following formula:
You can copy + paste the following code (formula:1) onto your Notion workspace to find the number from a text…
Simply use the toNumber operator to find number from a text in Notion (Formula: 2)
This is a basic formula that essentially works on the following logic:
“Simply find the toNumber operator to find the number from a text in Notion”
Here’s the formula we are going to use to find the number from a text in Notion:
You can copy + paste the following code (formula:2) onto your Notion workspace to find the number from a text…
Here’s what we learned about finding the number from a text in Notion. We have used 2 formulas to find the number from a text in notion in a database.
- unaryPlus(prop(“Number 1”))
- toNumber(prop(“No 1”))