Learn how to use the timestamp function in Notion formulas.

The timestamp() function converts a date argument into its corresponding Unix timestamp (also known as Unix Time or Epoch Time), which is a number.


The Unix timestamp is the number of seconds since January 1, 1970 at 00:00 UTC.

Notion’s timestamp() function specifically outputs a millisecond timestamp.

You can use this site to convert human-readable dates to Unix timestamps, or vice-versa:

Epoch Converter – Unix Timestamp Converter
Easy epoch/Unix timestamp converter for computer programmers. Includes epoch explanation and conversion syntax in various programming languages.

Good to know: Since Notion returns a millisecond timestamp, pasting the timestamp for very early dates (e.g. January 8, 1970) can cause conversion tools like the website above to return an incorrect date.

To account for this, remove the final three zeroes (000) from Notion’s timestamp before pasting into a conversion tool.

Learn more about Unix time:

What Is the Unix Epoch, and How Does Unix Time Work?
Unix stores time as the number of seconds since Jan. 1, 1970. And that means Linux does too. We explain this seemingly odd system, and why doomsday was scheduled for 2038.
timestamp(now()) // Output: 1656012120000 (will change with the value of now()

The example database below uses the timestamp() function to determine which of two dates is the later one.

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
// Compressed if(timestamp(prop("Date 1")) == timestamp(prop("Date 2")),"Date 1 and Date 2 are the same.",if(timestamp(prop("Date 1")) > timestamp(prop("Date 2")),"Date 1 is later than Date 2.","Date 2 is later than Date 1.")) // Expanded if( timestamp( prop("Date 1") ) == timestamp( prop("Date 2") ), "Date 1 and Date 2 are the same.", if( timestamp( prop("Date 1") ) > timestamp( prop("Date 2") ), "Date 1 is later than Date 2.", "Date 2 is later than Date 1." ) )

This formula uses a nested if-statement to first check if the timestamp values of the two dates are equal. If they are, the formula returns, “Date 1 and Date 2 are the same.”

If not, the next block checks to see if Date 1’s timestamp is larger than Date 2’s timestamp.

Depending on the result of this comparison, the formula will return, “Date 1 is later than Date 2,” or “Date 2 is later than Date 1.”

Other formula components used in this example:

if – Thomas Frank
equal – Thomas Frank
larger – Thomas Frank
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