1import datetime
2now = datetime.datetime.now()
3print(now.year, now.month, now.day, now.hour, now.minute, now.second)
1import datetime
2
3now = datetime.datetime.now()
4
5print(str(now.day).zfill(2)+'-'+str(now.month).zfill(2)+'-'+str(now.year)+' '+str(now.hour).zfill(2)+':'+str(now.minute).zfill(2)+':'+str(now.second).zfill(2))
6# Output
7# 24-05-2021 17:09:45