I\'ve tried the following code :
import datetime d = datetime.datetime.strptime(\"01/27/2012\", \"%m/%d/%Y\") print(d)
and the output is :
import datetime str_time= "2018-06-03 08:00:00" date_date = datetime.datetime.strptime(str_time, "%Y-%m-%d %H:%M:%S") print date_date