I have a variable testeddate which has a date in text format like 4/25/2015. I am trying convert it to %Y-%m-%d %H:%M:%S as follows:
testeddate
%Y-%m-%d %H:%M:%S
A less elegant solution would involve manipulating the string directly.
testeddate = '4/25/2015' month, day, year = testeddate.split('/') testeddate = '-'.join([year, month, day]) + ' 00:00:00'