I have a date time value November 10, 2021 which is to be converted into Django default datetime. I tried but got this error.
I have a date value which I got from list of dictionaries like this which is a datetime field.
created_at = data[0]['created_at']
print(created_at)
The print I got is like June 12, 2021
Now I tried this.
c = created_at.strftime(('%Y-%m-%d %H:%M:%S'))
print(created_at)
print(c)
When I print c, I got the above error. I know created_at object doesnt have strftime function but how can this conversion be done??