Some stable genius before my time wrote their dates into the database as strings. Not only that, but the format varies too. I have at least
05.08.1993
and
31.08.1993 00:00:00
Now I want to convert those to datetime objects using strptime(), e.g.
my_date = datetime.datetime.strptime(my_value, '%d.%m.%y')
So now I have to deal with the different formats. I can think of varous clumsy ways to do this, invlvong ugly cascades of ifs or trys. Is there an elegant way to do this?