from datetime import datetime
date_data ='02012019 09:02:53'
data = datetime.strptime(date_data,'%d%m%Y %H:%M:%S')
result = data.strftime('%d-%m-%Y %H:%M:%S')
# output '02-01-2019 09:02:53'
from datetime import datetime
date_data ='02012019 09:02:53'
data = datetime.strptime(date_data,'%d%m%Y %H:%M:%S')
result = data.strftime('%d-%m-%Y %H:%M:%S')
# output '02-01-2019 09:02:53'