diff --git a/Python/date&time.py b/Python/date&time.py new file mode 100644 index 0000000..02fb3c1 --- /dev/null +++ b/Python/date&time.py @@ -0,0 +1,6 @@ +# write a program to display current date and time + +import datetime +now = datetime.datetime.now() +print("The current date and time is") +print(now.strftime("%d-%m-%Y %H:%M:%S"))