Write a Python program to display the current date and time.
Write a Python program to display the current date and time.
Program
import datetime
def myfun():
x = datetime.datetime.now()
print("Current date and time : ")
print(x.strftime("%Y-%m-%d %H:%M:%S"))
if __name__=="__main__":
myfun()