Backto Python Index
import datetime
# make datetime from string
start_time = datetime.datetime.strptime("2019-08-20 14:35:25", '%Y-%m-%d %H:%M:%S')
# datetime to string and print
print(start_time.strftime('%Y-%m-%d %H:%M:%S'
Backto Python Index
import datetime
# make datetime from string
start_time = datetime.datetime.strptime("2019-08-20 14:35:25", '%Y-%m-%d %H:%M:%S')
# datetime to string and print
print(start_time.strftime('%Y-%m-%d %H:%M:%S'