You can install the dateutil library. Its parse
function can figure out what format a string is in without having to specify the format like you do with datetime.strptime
.
from dateutil.parser import parse
dt = parse('Mon Feb 15 2010')
print(dt)
# datetime.datetime(2010, 2, 15, 0, 0)
print(dt.strftime('%d/%m/%Y'))
# 15/02/2010