import datetime as d time = d.datetime.now() time = time.strftime("%Y-%m-%d %H:%M:%S") #year-#month-#date #hour:#minure:#second print(time)