I have an app using Django an my my model has the following field:
date = models.DateTimeField(auto_now_add=True,auto_now=False)
Using that I get this: June 5, 2016, 9:16 p.m.
but I need something like : Monday, June 5, 2016
How I can get that??
Any help will be great
Thanks in advance
It depends on the context. In a template you can use the date template tags:
<span>{{ my_date|date:"l, F j, Y" }}
or in Python context strftime:
my_date.strftime("%A, %B %W, %Y")
In case you just need the date (without time) you could consider using django's models.DateField
instead of models.DateTimeField