Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from datetime import datetime
now = datetime.now()
print now
current_month = now.month
current_day = now.day
current_year = now.year
current_hour = now.hour
current_minute = now.minute
current_second = now.second
print current_month
print current_day
print current_year
print str(current_month) + "/" + str(current_day) + "/" + str(current_year) + str(current_hour) + ":" + str(current_minute) + ":" + str(current_second)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment