Categories
Python Answers

How to change the default Python Django date template format?

Spread the love

To change the default Python Django date template format, we can use the date filter.

For instance, we write

<p>Birthday: {{ birthday|date:"M d, Y" }}</p>

in our template to change the date format of birthday with the date filter.

We should get something like

Jan 29, 2000

rendered

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *