Convert a string to datetime object in python,print(dateobj.strftime('%Y-%m-%d'))