app.py
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import datetime current_time = datetime.datetime.now() print("The attributes of now() are :") print("Year :", current_time.year) print("Month : ", current_time.month) print("Day : ", current_time.day) print("Hour : ", current_time.hour) print("Minute : ", current_time.minute) print("Second :", current_time.second) print("Microsecond :", current_time.microsecond) |