Skip to main content
Version: 4.1

Date and time formatting in placeholders

There are many placeholders that contain date and time information. Slide Presenter offers a very flexible way to format how this date / time information is displayed: so called format templates.

Format templates are a string of text in which certain patterns are replaced with the actual values.

note

An example is MM/dd/yyyy HH:mm:ss - this format string becomes somthing like “02/23/2008 13:12:59”.

Common format templates​

The whole list of patterns can be a little overwhelming. Take these as starting points:

  • For dates with leading zeros:

    • MM/dd/yyyy becomes “04/29/2026”
    • dd.MM.yyyy becomes “23.02.2008”
  • For times with leading zeros:

    • HH:mm becomes “23:59”
    • hh:mm b becomes “11:59 PM”

There are shorthand patterns that represent a whole localized date / time. This will show the date in the way the user is most used to, based on their browser locale. Beware that presentations created in Germany will then show a different date format than presentations created in the US.

  • P becomes “04/29/2026” or “29.04.2026” etc.
  • p becomes “11:59 PM” or “23:59” etc.
  • Pp becomes something like “04/29/2026 11:59 PM”

Reference of available patterns​

Here is a list of useful patterns for your format templates.

info

Beware! The patterns are case sensitive.

PatternMeaning
Calendar year
y44, 1, 1990, 2026
yy44, 01, 90, 26
yyyy0044, 0001, 1990, 2026
Month
M1, 2, …, 12
MM01, 02, …, 12
MMMJan, Feb, …, Dec
MMMMJanuary, February, …, December
Day of the month
d1, 2, …, 31
dd01, 02, …, 31
do1st, 2nd, …, 31st
Hours (1-12)
bAM, PM, noon, midnight
bbbam, pm, noon, midnight
h1, 2, …, 11, 12
hh01, 02, …, 11, 12
Hours (0 - 23)
H0, 1, 2, …, 23
HH00, 01, 02, …, 23
Minutes
m0, 1, …, 59
mm00, 01, 02, …, 59
Seconds
s0, 1, …, 59
ss00, 01, 02, …, 59
Day of the week
EMon, Tue, Wed, …, Sun
EEEEMonday, Tuesday, Wednesday, …
EEEEEM, T, W, T, F, S, S
EEEEEEMo, Tu, We, Th, Fr, Sa, Su
Day of the year
D1, 2, …, 365, 366
DDD001, 002, …, 365, 366
Do1st, 2nd, …, 366th
Week of the year
w1, 2, …, 53
ww01, 02, …, 53
wo1st, 2nd, …, 53th
Quarters
Q1, 2, 3, 4
Qo1st, 2nd, 3rd, 4th
QQQQ1, Q2, Q3, Q4
Timezones
zGMT-8, GMT+5:30
x-08, +0530
Seconds Timestamp
t1775655437
Full localized dates(uses the locale of the current browser)
P04/29/2026, 29.04.2026, 2026. 04. 08., …
PPPApril 29th, 2026 / …
PPPPFriday, April 29th, 2026 / 2026. április 8., szerda / Mittwoch, 8. April 2026
p12:00 AM, 23:59, …
Pp04/29/2026 12:00 AM, 29.04.2026 12:00, …

And there’s even more! Under the hood, Slide Presenter uses date-fns for date formatting. Everything mentioned in the date-fns documentation works here as well.