Last active
January 20, 2017 20:17
-
-
Save KameronKales/7ac47ec2192f0eb256e69291666e60ee to your computer and use it in GitHub Desktop.
This is a quick and dirty way to find the time a conference room is open & format in the format I needed to key into a form.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime as dt | |
year = dt.now().year | |
month = dt.now().month | |
day = dt.now().day | |
for i in str(month): | |
if month == 1: | |
month = "January" | |
elif month == 2: | |
month = "February" | |
elif month == 3: | |
month = "March" | |
elif month == 4: | |
month = "April" | |
elif month == 5: | |
month ="May" | |
elif month == 6: | |
month = "June" | |
elif month == 7: | |
month = "July" | |
elif month == 8: | |
month = "August" | |
elif month == 9: | |
month = "September" | |
elif month == 10: | |
month = "October" | |
elif month == 11: | |
month = "November" | |
else: | |
month = "December" | |
hq_date = str(day) + ' ' + month + ' ' + str(year) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment