Source Code:
(back to article)
from datetime import datetime date_string = "Jun 1 2005 1:33PM" # Parse the date string date_object = datetime.strptime(date_string, "%b %d %Y %I:%M%p") print(date_object) # Output: 2005-06-01 13:33:00
Result:
Report an issue