1from datetime import date
2
3today = date.today()
4print("Today's date:", today)
1
2from datetime import datetime
3
4now = datetime.now().time() # time object
5
6print("now =", now)
7print("type(now) =", type(now))
1from datetime import date
2
3today = date.today()
4print("Today's date:", today)
5
1import datetime
2print(datetime.datetime.now()) # --> (year, month, day, hour, minute, second, millisecond)