From ad028d231ac809e306ab071fffccb9fd8d77845d Mon Sep 17 00:00:00 2001 From: whalesharx <98609535+whalesharx@users.noreply.github.com> Date: Tue, 15 Oct 2024 10:34:09 -0700 Subject: [PATCH] Add files via upload --- Python/TimeandDate.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Python/TimeandDate.py diff --git a/Python/TimeandDate.py b/Python/TimeandDate.py new file mode 100644 index 0000000..bb2c603 --- /dev/null +++ b/Python/TimeandDate.py @@ -0,0 +1,11 @@ +#find local time +import datetime + +# Print Hello, World! +print("Hello, World!") + +# Get the current time +current_time = datetime.datetime.now() + +# Print the current time +print("The current time is:", current_time.strftime("%Y-%m-%d %H:%M:%S")) \ No newline at end of file