Formatting Dates

Formatting Dates

Master Tag
Tips & Tricks
Created
Mar 15, 2021 05:21 PM
Usage
formateDate
Web Tags
Layout
Formula
Alternatives
Cover
Week Of Month (7).png
  • Add (..th..st..rd) to numbers with "o" [ex. Do = 3rd]
  • Turn format into a numerical value: wrap with toNumber() [ex. toNumber(formatDate(prop("Date"), "Q"))]
 

Quarter

 

Formula

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

Action

Quarter 1-4

Week Number

 

Formula

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

Action

Week # Starting Sunday (1-52)

Formula

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

Action

Week # Starting Monday (1-52)

Year

 

Formula

formatDate(prop("Date"), "YYYY")

Action

YYYY (2021)

Formula

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

Action

YY (21)

AM/PM

 

Formula

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

Action

am/pm
 

Formula

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

Action

AM/PM

Weekday

 

Formula

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

Action

Weekday #
 

Formula

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

Action

Weekday (Fr)

Formula

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

Action

Weekday (Fri)

Formula

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

Action

Weekday (Friday)

Date

 

Formula

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

Action

Date (1/3/21)

Formula

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

Action

Date (1/03/21)

Formula

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

Action

Day # of the Year

Hour

 

Formula

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

Action

Hour standard (4:13 pm)

Formula

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

Action

24-Hour time (16:13 pm)
  • 12am = 0

Formula

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

Action

24-Hour time (16:13 pm)
  • 12am = 24

Full Format

 

Formula

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

Action

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

Formula

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

Action

MMM D, YYYY (Mar 3, 2021)

Formula

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

Action

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

Formula

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

Action

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

Formula

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

Action

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

Formula

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

Action

MMMM D, YYYY (March 3, 2021)

Formula

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

Action

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

Formula

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

Action

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

Formula

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

Action

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

Timezone

 

Formula

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

Action

Timezone (EDT)

Formula

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

Action

Timezone Offset (-4:00)

Formula

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

Action

Timezone Offset (-0400)

Timestamp

 

Formula

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

Action

Unix timestamp (1616731200)

Minute

 

Formula

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

Action

Minute (12:03 PM)
 

Formula

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

Action

Minute (12:03 PM)

Month

 

Formula

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

Action

Month (4/13/21)

Formula

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

Action

Month (04/13/21)

Formula

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

Action

Month (Apr)

Formula

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

Action

Month (April)

Combine Formats

 

Formula

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

Action

Friday the 16th of May

Formula

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

Action

Wed, Mar 3, 2021 1:40 AM EST

Formula

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

Action

2021-03-17T13:03:1616000580

Formula

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

Action

1:40 PM EDT-04:00