OGapp Development OGapp Development - 2 years ago 70
HTML Question

How can I display on html (Django project), value of date filed but, the month 3 letters

on my HTML file I have a value of a date filed like this :

<div> {{ offer.expiry_time }} </div>

the output on the page is:
June ,15,2016

June for example has 4 letters but I need only the 3 first letters.

It should look like:

Answer Source

You can pass arguments to the date filter:

{{ offer.expiry_time:"b,j,Y" }}

You can see the definitions of each of those letters in the documentation linked above.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download