This page is part of a static HTML representation of the TiddlyWiki at


1st December 2020 at 3:45pm

When used to display date values (with the format attribute set to date), the ViewWidget accepts a template attribute that allows the format of the date values to be specified. The format string is processed with the following substitutions:

TokenSubstituted Value
DDDDay of week in full (eg, "Monday")
dddShort day of week (eg, "Mon")
DDDay of month
0DDAdds a leading zero
DDthAdds a suffix
WWISO-8601 week number of year
0WWAdds a leading zero
MMMMonth in full (eg, "July")
mmmShort month (eg, "Jul")
MMMonth number
0MMAdds leading zero
YYYYFull year
YYTwo digit year
wYYYYFull year with respect to week number
aYYYY New in: 5.1.23 Full year but negative dates are displayed as positive
wYYTwo digit year with respect to week number
{era:BCE||CE} New in: 5.1.23 Displays a different string for years that are negative, zero or positive (see below)
0hhAdds a leading zero
hh12Hours in 12 hour clock
0hh12Hours in 12 hour clock with leading zero
0mmMinutes with leading zero
0ssSeconds with leading zero
0XXXMilliseconds with leading zero
am or pmLower case AM/PM indicator
AM or PMUpper case AM/PM indicator
TZDTimezone offset
\xUsed to escape a character that would otherwise have special meaning
[UTC]Time-shift the represented date to UTC. Must be at very start of format string

Note that other text is passed through unchanged, allowing commas, colons or other separators to be used.

The {era:BCE||CE} notation can specify different strings for years that are negative, zero or positive. For example {era:BC|Z|AD} would display BC for negative years, AD for positive years, and Z for year zero.


DDth MMM YYYY16th February 2011
DDth MMM \M\M\M YYYY16th February MMM 2011
DDth mmm YYYY 0hh:0mm:0ss16th Feb 2011 11:38:42