Red Gregory

View Original

How To Format Dates In Notion: A Cheat Sheet

See this content in the original post
See this content in the original post

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

Quarter 1-4

See this content in the original post

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

Week # Starting Sunday (1-52)

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

Week # Starting Monday (1-52)

See this content in the original post

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

YYYY (2021)

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

YY (21)

See this content in the original post

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

am/pm

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

AM/PM

See this content in the original post

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

Weekday #

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

Weekday (Fr)

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

Weekday (Fri)

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

Weekday (Friday)

See this content in the original post

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

Date (1/3/21)

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

Date (1/03/21)

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

Day # of the Year

See this content in the original post

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

See this content in the original post

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)

See this content in the original post

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

Timezone (EDT)

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

Timezone Offset (-4:00)

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

Timezone Offset (-0400)

See this content in the original post

Limitation: seconds are not recorded in timestamps

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

Unix timestamp (1616731200)

See this content in the original post

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

Minute (12:03 PM)

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

Minute (12:03 PM)

See this content in the original post

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)

See this content in the original post

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

See this gallery in the original post