I have a field in my model
published_on = models.DateTimeField()
on a Django template page and I want to show only the date instead of date along with time. Any idea how to truncate the time form date in the django model form?
Thanks in advance.
Use the date filter in your template, for instance:
Or just:
You can customize the output the way you want, or use the locale default. See this link for details.