Try this,
>>> import datetime
>>> datetime.datetime.now().strftime('%d-%m-%Y %H:%M:%S')
'03-08-2019 12:43:16'
If you max_startdate
is string,
>>> max_startdate="2019-08-03 01:08:58.155000"
>>> max_startdate.split('.')[0]
'2019-08-03 01:08:58'
3
solved How i can convert ISO time format to yyyy-mm-dd hh:mm:ss using python [closed]