I'm simply trying to convert a date-string to a date:
import datetime
exampleDate = 'Jul 8 2021'
datetime.datetime.strptime(exampleDate, '%b %d %Y')
However, I'm later outputting this to a json, and i'm getting an error:
datetime.datetime(2021, 7, 8, 0, 0) is not JSON serializable
Can confirm in Python console that exampleDate is not printing out as a date, but rather in this serialized fashion. All I want is: 2021-07-08
.