from datetime import datetime now = datetime.now() >>> print(now) # year-month-day, hour:minute:second.microsecond 2021-11-29 11:15:56.233038