I have a datetime value that is available in a django template.
I am trying to format the date as "d-mmm"
so for example dates are formated as:
etc.
I have tried different combinations - NOTHING works so far?. I hope I dont have to write a custom filter just to format a date ?
[Edit]
I tried the 'obvious' format string like: 'j-M', 'j-N', (even 'j-mmm' and 'd-mmm')
Have you tried {{ some_date|date:"j-M" }}
?
http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With