Database, Program Functions

How To Format Dates In Notion: A Cheat Sheet

date-formulas-notion-list.png

🧵 40 formatDate Formulas

Formatting dates with Notion formulas can be incredibly useful. Below I provide 40 different examples of formulas that range from finding the month number to timezone offsets. Try these formulas out for yourself and arrange them in an order that enhances the understanding of your workspace calendars.

2022-2023 Calendars

A bundle of calendar images for Notion galleries that span from Sep 2022 to Dec 2023 + more!

Quarter Formula

formatDate(prop("Date"), "Q")

Quarter 1-4

 

Week Number Formulas

formatDate(prop("Date"), "w")

Week # Starting Sunday (1-52)

formatDate(prop("Date"), "W")

Week # Starting Monday (1-52)

 

Year Formulas

formatDate(prop("Date"), "Y")

YYYY (2021)

formatDate(prop("Date"), "YY")

YY (21)

 

AM/PM Formulas

formatDate(prop("Date"), "a")

am/pm

formatDate(prop("Date"), "A")

AM/PM

 

Weekday Formulas

formatDate(prop("Date"), "d")

Weekday #

formatDate(prop("Date"), "dd")

Weekday (Fr)

formatDate(prop("Date"), "ddd")

Weekday (Fri)

formatDate(prop("Date"), "dddd")

Weekday (Friday)

 

Date Formulas

formatDate(prop("Date"), "D")

Date (1/3/21)

formatDate(prop("Date"), "DD")

Date (1/03/21)

formatDate(prop("Date"), "DDD")

Day # of the Year

 

Hour Formulas

formatDate(prop("Date"), "h")

Hour standard (4:13 pm)

formatDate(prop("Date"), "H")

24-Hour time (16:13 pm)

  • 12am = 0

formatDate(prop("Date"), "k")

24-Hour time (16:13 pm)

  • 12am = 24

 

Full Format Formulas

formatDate(prop("Date"), "l")

M/D/YYYY (1/3/2021)

formatDate(prop("Date"), "ll")

MMM D, YYYY (Mar 3, 2021)

formatDate(prop("Date"), "lll")

MMM D, YYYY h:mm A (Mar 3, 2021 1:40 AM)

formatDate(prop("Date"), "llll")

ddd, MMM D, YYYY h:mm A (Wed, Mar 3, 2021 1:40 AM)

formatDate(prop("Date"), "L")

MM/DD/YYYY (03/01/21)

formatDate(prop("Date"), "LL")

MMMM D, YYYY (March 3, 2021)

formatDate(prop("Date"), "LLL")

MMMM D, YYYY h:mm A (March 3, 2021 1:40 AM)

formatDate(prop("Date"), "LLLL")

dddd, MMMM D, YYYY h:mm A (Wednesday, March 3, 2021 1:40 PM)

formatDate(prop("Date"), "LT")

Time (h:mm A → 3:03 PM)

 

Timezone Formulas

formatDate(prop("Date"), "z")

Timezone (EDT)

formatDate(prop("Date"), "Z")

Timezone Offset (-4:00)

formatDate(prop("Date"), "ZZ")

Timezone Offset (-0400)

 

Timestamp Formulas

Limitation: seconds are not recorded in timestamps

formatDate(prop("Date"), "X")

Unix timestamp (1616731200)

 

Minute Formulas

formatDate(prop("Date"), "m")

Minute (12:03 PM)

formatDate(prop("Date"), "mm")

Minute (12:03 PM)

 

Month Formulas

formatDate(prop("Date"), "M")

Month (4/13/21)

formatDate(prop("Date"), "MM")

Month (04/13/21)

formatDate(prop("Date"), "MMM")

Month (Apr)

formatDate(prop("Date"), "MMMM")

Month (April)

 

Combine Format Formulas

formatDate(prop("Date"), "dddd [the] Do [of] MMMM")

Friday the 16th of May

formatDate(prop("Date"), "llll z")

Wed, Mar 3, 2021 1:40 AM EST

formatDate(prop("Date"), "YYYY-MM-DD[T]HH:mm:X")

2021-03-17T13:03:1616000580

formatDate(prop("Date"), "LT zZ")

1:40 PM EDT-04:00

 

Extra Tips

  • Add (..th..st..rd) to numbers with "o"

    • [ex. formatDate(prop("Date"), "Qo") = 3rd]

  • Turn format into a numerical value: wrap with toNumber()

    • [ex. toNumber(formatDate(prop("Date"), "Q"))]

View All Examples In Notion

 

Further Reading