import datetime d = datetime.datetime.strptime("01/27/2012", "%m/%d/%Y") print(d) output .... 2012-01-27 00:00:00