Template page

data-sort-value="{{{1}}}0" |

Template documentation (for the above template, sometimes hidden or invisible)

This template is used to add date sorting and formatting to a table cell.


Enter the desired date as the first parameter as per the table below. A month and day are not required. For year pages, the year is omitted.

Cell contents Result
{{td|20221026}} October 26, 2022
{{td|202210}} October 2022
{{td|2022}} 2022
{{td|1026}} October 26
{{td|10}} October

For unknown dates, {{unknown}} is used.

Preferred date format

The date printed by this template will change format depending on the users' preferences. To set your preferred format, make sure you have an account and are logged in. Access your preferences (in the default desktop skin, click on your user name in the top right, on the default mobile skin, open the menu on the left-hand side), select the "Appearance" tab, and select a date format under the "Date format" header. Note that only dates created using this template will change format.

Visit Template:Td/doc to edit this text. (How does this work?)

Formats dates to allow sorting and formatting in table cells.

Template parameters

This template prefers inline formatting of parameters.


Numeric date, such as "20180719", "201807" or "2018". On year pages, the year may be left out so July 19th would be "0719" and July is "07"