I currently have a table which is displaying on a HTML page, data which has been inputted into from a form. I think the format for the data in MySQL table saves as yyyy-mm-dd. I would like the date that is displayed on the table to be in the format DD-MM-YYYY.
I have tried looking at previous questions but cannot find a solution for this.
Below is a snippet of my code for the HTML table which pulls information from some of my model tables.
<tr>
<td>
{{ current_user.first_name }} {{ current_user.last_name }}
</td>
<td>
{% if current_user.tasterday %}
{{ current_user.tasterday.date }}
{% else %}
-
{% endif %}
</td>
<td>
{% if current_user.course %}
{{ current_user.course.name }}
{% else %}
-
{% endif %}
</td>
<td>
{% if current_user.tasterday %}
{{ current_user.tasterday.description }}
{% else %}
-
{% endif %}
</td>
</tr>
Could someone please tell me what I need to add to the date section so that the format is DD-MM-YYY. Thankyou.