I have the following date string which I tried to extract the date from. I am getting an error as I am obviously not parsing it correctly.
from datetime import datetime
date_string = '2021-05-16T13:24:31+0000'
date_format = "%Y-%m-%d'T'%H:%M:%S'+0000'"
date_object = datetime.strptime(date_string, date_format)
print(date_object.date)
What would be the correct parsing format for this date string '2021-05-16T13:24:31+0000'?
Thank you.