Created
March 26, 2014 07:41
-
-
Save pbojinov/9778414 to your computer and use it in GitHub Desktop.
using python datetime for current time and time next year
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 timedelta, datetime | |
# current time | |
now = datetime.now() | |
print now | |
# a year from now | |
next_year = (datetime.today()+ timedelta(days=365)) | |
print next_year |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment