Assuming you pass instance
when creating the form object, you can access it in your template using:
{{ form.instance.datetime|date:"Y/m/d H:i:s" }}
If you don't have an instance, the smartest thing is to use the current time:
{% now "Y/m/d H:i:s" %}
source share