Convert a string to a datetime in Python

Use datatime.strptime

from datetime import datetime

dt = datetime.strptime("5 Dec 1974 22:15:00", "%d %b %Y %H:%M:%S")
print dt
1974-12-05 22:15:00