Python Strptime
import datetime
d =datetime.datetime.strptime("01/27/2012","%m/%d/%Y").strftime('%m/%d/%Y')
print d
01/27/2012
launchable 720
import datetime
d =datetime.datetime.strptime("01/27/2012","%m/%d/%Y").strftime('%m/%d/%Y')
print d
01/27/2012
import datetime
d = datetime.datetime.strptime("01/27/2012", "%m/%d/%Y")
print(d)
output ....
2012-01-27 00:00:00
from datetime import datetime
date_string = "21 June, 2018"
print("date_string =", date_string)
date_object = datetime.strptime(date_string, "%d %B, %Y")
print("date_object =", date_object)