xxxxxxxxxx
# Load class from library
from datetime import datetime
# Dates strings
d1 = "Monday, November 1, 2021"
d2 = "05/23/19 1:23 PM"
Convert string into datetime objects
dt1 = datetime.___(d1, "___")
dt2 = datetime.___(d2, "___")
print(f"String '{d1}' converted to datetime: {dt1}")
print(f"String '{d2}' converted to datetime: {dt2}")