Skip to content

Instantly share code, notes, and snippets.

@pexceful
Created January 16, 2017 12:44
Show Gist options
  • Save pexceful/d7f74517359b1baa32cbc6ac7c087a58 to your computer and use it in GitHub Desktop.
Save pexceful/d7f74517359b1baa32cbc6ac7c087a58 to your computer and use it in GitHub Desktop.
from datetime import datetime
now = datetime.now()
print now
print now.month
print now.day
print now.year
print str(now.month) + str("%") + str(now.day) + str("%") + str(now.year)
@OmgImAlexis
Copy link

from datetime import datetime
now = datetime.now()
print now
print now.month
print now.day
print now.year
print "%s %s %s" % (now.month, now.day, now.year)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment