Skip to content
On this page

Date formatting in templates

In templates you can add a date syntax to the title of that content with the syntax

{date:<format>}

where <format> can be a combination of all rules in the tables below. For example, a template title Journal - {date:YYYY-MM-DD} will result in a title like Journal - 2023-02-10 if created on February 10, 2023.

Localized formats

You can also use localized formats. The options below will be applied based on your language settings.

FormatEnglish LocaleSample Output (English)
LTh:mm A8:02 PM
LTSh:mm:ss A8:02:18 PM
LMM/DD/YYYY08/16/2018
LLMMMM D, YYYYAugust 16, 2018
LLLMMMM D, YYYY h:mm AAugust 16, 2018 8:02 PM
LLLLdddd, MMMM D, YYYY h:mm AThursday, August 16, 2018 8:02 PM
lM/D/YYYY8/16/2018
llMMM D, YYYYAug 16, 2018
lllMMM D, YYYY h:mm AAug 16, 2018 8:02 PM
llllddd, MMM D, YYYY h:mm AThu, Aug 16, 2018 8:02 PM

List of standard formats

If you want more nuanced control, you can use the following variables connected by any symbols (e.g. -, /, '.', etc..).

FormatOutputDescription
YY18Two-digit year
YYYY2018Four-digit year
M1-12The month, beginning at 1
MM01-12The month, 2-digits
MMMJan-DecThe abbreviated month name
MMMMJanuary-DecemberThe full month name
D1-31The day of the month
DD01-31The day of the month, 2-digits
d0-6The day of the week, with Sunday as 0
ddSu-SaThe min name of the day of the week
dddSun-SatThe short name of the day of the week
ddddSunday-SaturdayThe name of the day of the week
H0-23The hour
HH00-23The hour, 2-digits
h1-12The hour, 12-hour clock
hh01-12The hour, 12-hour clock, 2-digits
m0-59The minute
mm00-59The minute, 2-digits
s0-59The second
ss00-59The second, 2-digits
SSS000-999The millisecond, 3-digits
Z+05:00The offset from UTC, ±HH:mm
ZZ+0500The offset from UTC, ±HHmm
AAM PM
aam pm

Built with ❤️ and ☕️ in 🇪🇺.