use datetime module
import datetime
datetime.date.today()#Today's date
datetime.datetime.today()#Until time
datetime.date.today().year#Year
datetime.date.today().day#Day
datetime.datetime.today().microsecond#It takes less than 1 second
datetime.date.today().isoformat()#Format specification
datetime.datetime.today().strftime("%Y/%m/%d/%H/%M/%S")#Format specification
Recommended Posts