date format django template filter
{% load tz %}
{% comment %} Assuming you have a variable named 'my_date' representing a date object {% endcomment %}
{% with my_date|date:"Y-m-d" as formatted_date %}
{{ formatted_date }}
{% endwith %}
{% load tz %}
{% comment %} Assuming you have a variable named 'my_date' representing a date object {% endcomment %}
{% with my_date|date:"Y-m-d" as formatted_date %}
{{ formatted_date }}
{% endwith %}