Entry
Query system date
Jul 5th, 2000 10:00
Nathan Wallace, unknown unknown, Hans Nowak, Snippet 138, ScherBi
"""
Packages: basic_applications.date_and_time
"""
"""
I am new to python and I am trying to figure out how to return the
computers system date and time and then format it as MM-DD-YYYY. I have
searched the documentation up and down and have not found anything about
how to accomplish this. Any help would be greatly appeciated.
"""
import time
print time.strftime("%m-%d-%Y", time.localtime(time.time()))
# e.g. '09-09-2020'
""" See the docs on the time module for more info. """