This blog is primarily focus on Java fundamentals and the libraries built on top of Java programming language. Most of the post are example oriented, hope you have fun in reading my blog....:)
Thursday, 23 September 2021
Python: Get today date and time
‘datetime.now()’
or ‘datetime.today()’ methods return the today date and time.
today_details_1.py
from datetime import datetime
print(datetime.now())
print(datetime.today())
No comments:
Post a Comment