Pie Calendar Tags for Bricks – Cheat Sheet

Here are some common placeholders you can use in your custom patterns:

  1. Year:
    • y: Year (2 digits)
    • yy: Year (4 digits)
    • yyyy: Year (4 digits, zero-padded)
  2. Month:
    • M: Month (1 or 2 digits)
    • MM: Month (2 digits, zero-padded)
    • MMM: Abbreviated month name (e.g., “Jan”)
    • MMMM: Full month name (e.g., “January”)
  3. Day:
    • d: Day of the month (1 or 2 digits)
    • dd: Day of the month (2 digits, zero-padded)
  4. Hour:
    • h: Hour (1 or 2 digits, 12-hour clock)
    • hh: Hour (2 digits, zero-padded, 12-hour clock)
    • H: Hour (1 or 2 digits, 24-hour clock)
    • HH: Hour (2 digits, zero-padded, 24-hour clock)
  5. Minute:
    • m: Minute (1 or 2 digits)
    • mm: Minute (2 digits, zero-padded)
  6. Second:
    • s: Second (1 or 2 digits)
    • ss: Second (2 digits, zero-padded)
  7. Timezone:
    • z: Timezone abbreviation (e.g., “PST”)
    • zzzz: Full timezone name (e.g., “Pacific Standard Time”)
  8. Other:
    • a: AM/PM marker
    • E: Day of the week (abbreviated)
    • EEEE: Full day of the week

For example, if you want to format a date as “YYYY-MM-dd HH:mm:ss z” (e.g., “2024-04-01 14:30:45 PDT”), you can set the pattern like this:

This is the link to the information on Formatting Dates and Times.

Related posts