import datetime print(datetime.datetime.now()) # 2020-10-15 12:02:45.676482 print(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')) # 2020-10-15 12:02:45.676516
import datetime print(datetime.datetime.now()) # 2020-10-15 12:02:45.676482 print(datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S.%f')) # 2020-10-15 12:02:45.676516