get date and time in python

46

get current date and time with python -

import datetime
print(datetime.datetime.now())
2021-11-13 23:30:38.419951
print(datetime.date.today())
2021-11-13

Comments

Submit
0 Comments