Can someone help me in parsing the date like this to datetime format
'Oct. 1, 2020'
Thanks
Can someone help me in parsing the date like this to datetime format
'Oct. 1, 2020'
Thanks
This should do:
from datetime import datetime
my_date = 'Oct. 1, 2020'
my_date_object = datetime.strptime(my_date, '%b. %d, %Y')
print(my_date_object) # datetime.datetime(2020, 10, 1, 0, 0)