django strptime 1

django strptime

from django.template.defaultfilters import date as django_date_filter
print django_date_filter(mydate, 'P, D M j, Y')   

Here is what the above code is Doing:
1. Importing the date filter from the default filters.
2. Printing the date in the format of “P, D M j, Y”

The output of the above code will be:

Thu, Jan 1, 1970

Similar Posts