I get start_date like this: start_date1 = datetime.datetime.utcnow().replace(tzinfo=utc)
and pass end_date as a function argument like this:
a(datetime.datetime.utcnow().replace(tzinfo=utc))
They both are stored in database under start_date and end_date
coloum name.
What I am trying to do is subtract end_date and start_date to get duration:
start_date = [i.start_date for i in b ]
end_date = [i.end_date for i in b ]
I would use this to subtract those two dates: t = [i - j for i, j in zip(y, x)]
However the problem is start_date and end_date are returned in unicodes. I can't convert them into datetime format again. What should I do?