Why is Python datetime time delta not found? : <p>I am trying to make an array of dates in mmddyyyy format. The dates will start on the current day and then go two weeks into the future. So it all depends on the starting date. When I run my code I get an error that states:</p>

<pre><code>Traceback (most recent call last):
File "timeTest.py", line 8, in &lt;module&gt;
day = datetime.timedelta(days=i)
AttributeError: type object 'datetime.datetime' has no attribute 'timedelta'
</code></pre>

<p>I am not sure why this is happening because after searching online, I noticed that people are using the 'timedelta' in this way.</p>

<p>Here is my code:</p>

<pre><code>import time
from datetime import datetime, date, time, timedelta

dayDates = []
today = datetime.now()
dayDates.append(today.strftime("%m%d%Y"))
for i in range(0,14):
    day = today + datetime.timedelta(days=i)
    print day
</code></pre>
