Converting unicode date to datetime object.

In a django template i had something like:

value="{{ query_date|date:'%d/%m/%Y' }}"

And in my view i wanted a date not an unicoded date.
So i did this in a view to parse the unicode and convert it to datetime object. 

from datetime import datetime
query_date_obj = datetime.strptime(query_date, "%d/%m/%Y")



Popular posts from this blog

Como configurar el control de directv para que funcione con el Tv

Install compass in Mac Os El Capitan

Open Source Software for Mac