Created
September 29, 2011 22:56
-
-
Save slackorama/1252171 to your computer and use it in GitHub Desktop.
Get year, month and day from a python date object.
This file contains hidden or 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
year = time.strftime("%Y", sampledate) | |
month = "%02d" % int(time.strftime("%m", sampledate)) | |
day = "%02d" % int(time.strftime("%d", sampledate)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment