Convert a string to datetime object in python,"dateobj = datetime.datetime.strptime(datestr, '%Y-%m-%d').date()"