Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python datetime get all days between two dates

from datetime import date, timedelta

sdate = date(2008, 8, 15)   # start date
edate = date(2008, 9, 15)   # end date

delta = edate - sdate       # as timedelta

for i in range(delta.days + 1):
    day = sdate + timedelta(days=i)
    print(day)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #datetime #days #dates
ADD COMMENT
Topic
Name
1+8 =