minute

Learn how to use the minute function in Notion formulas.

The minute() function returns an integer (number) between 0 and 59 that corresponds to the minute of its date argument.

minute(date)

date.minute()
Code language: JavaScript (javascript)

minute() (and its sibling functions hour, day, date, month, week, and year) is useful for manipulating dates within Notion formulas.

minute(now()) /* Output: 25 (When current time was 11:25 AM) */

/* Assume a property called Date with a current date of June 24, 2022 11:29 AM */
prop("Date").minute() /* Output: 29 */
Code language: JavaScript (javascript)

minute() can be used with other functions such as dateSubtract to change the value of a date, like so:

/* Assume the value of now() is June 24, 2022 11:34 AM */
now().dateSubtract(now().minute(), "minutes")
/* Output: June 24, 2022 11:00 AM */
Code language: JavaScript (javascript)

You can take this concept even further to “hard-code” any date into a Notion formula. See the section on Hard-Coding Dates into Formulas within the now article for more on how to do this.

This example database shows both the current time (using the now function), as well as the current time rounded to the nearest hour.

Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.
A new tool that blends your everyday work apps into one. It’s the all-in-one workspace for you and your team
thomasfrank.notion.site
let(
	minute, now().minute(),
	if(
		minute < 30,
		dateSubtract(
			now(),
			minute,
			"minutes"
		),
		dateAdd(
			now(),
			60 - minute,
			"minutes"
		)
	)
)

/* Explained */
let(

	/* First, get the minute value of now() and set it as a minute variable */
	minute, now().minute(),

	if(

		/* Check if the minute value is less than 30 */
		minute < 30,

		/* If so, subtract the minute value from now() to get the current hour */
		dateSubtract(
			now(),
			minute,
			"minutes"
		),

		/* If not, add the minute value to now() to get the next hour */
		dateAdd(
			now(),
			60 - minute,
			"minutes"
		)
	)
)
Code language: JavaScript (javascript)

Other formula components used in this example:

if – Thomas Frank
thomasjfrank.com
now – Thomas Frank
thomasjfrank.com
dateSubtract – Thomas Frank
thomasjfrank.com
dateAdd – Thomas Frank
thomasjfrank.com
subtract – Thomas Frank
thomasjfrank.com
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.

🤔 Have an UB Question?

Fill out the form below and I’ll answer as soon as I can! ~Thomas

🤔 Have a Question?

Fill out the form below and I’ll answer as soon as I can! ~Thomas