Header Ads Widget

Program to print current date and time in python

import datetime
now = datetime.datetime.now()
print ("Current date and time : ")
print (now.strftime("%Y-%m-%d %H:%M:%S"))
Output:-
>>> = RESTART: C:/Users/Rajnish Tripathi/AppData/Local/Programs/Python/Python38-32/date.py 29-08-2020 14:07:40 >>>



Post a Comment

0 Comments