I have time as 2016-03-07 14:42:48.901013+05:30
but this is in the form of string. I want to have it as a datetime object type , as I want to compare it with the update_ts(auto_add_now) field of django. Any help to achieve this will be highly appreciated.
I have tried using x = datetime.strptime(ts, '%Y-%m-%dT%H:%M:%S.%UTZ')
but it doesn't work for me.