1import pandas as pd
2from datetime import datetime
3
4pd.date_range(end = datetime.today(), periods = 100).to_pydatetime().tolist()
5
6#OR
7
8pd.date_range(start="2018-09-09",end="2020-02-02").to_pydatetime().tolist()
1from datetime import date, timedelta
2
3sdate = date(2008, 8, 15) # start date
4edate = date(2008, 9, 15) # end date
5
6delta = edate - sdate # as timedelta
7
8for i in range(delta.days + 1):
9 day = sdate + timedelta(days=i)
10 print(day)
1import pandas as pd
2from datetime import datetime, date
3
4pd.date_range(start=date(2018, 9, 9),end=date(2020, 2, 2)).to_pydatetime().tolist()