Created
July 8, 2014 16:51
-
-
Save sandeep048/e8c48966b72e8292a021 to your computer and use it in GitHub Desktop.
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
import datetime | |
start = datetime.datetime.strptime("21-06-2014", "%d-%m-%Y") | |
end = datetime.datetime.strptime("07-07-2014", "%d-%m-%Y") | |
date_generator= (start + datetime.timedelta(days=x) for x in xrange((end-start).days)) | |
for date in date_generator: | |
print date.strftime("%d-%m-%Y") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment