title: Assigning datetime as index does not give DatetimeIndex
body: <p>My df has a field called "days". I need to create a datetime from "days" and a startdate. Probably cumbersome, but it works:</p>
  
  <pre><code>for t in df.index:
      df.loc[t,'date']=datetime.date(startdate)+
      datetime.timedelta(days=df.loc[t,'days'])
  df.index=df.date
  </code></pre>
  
  <p>When I try to upsample:</p>
  
  <pre><code>udf=df.resample('M',how='sum')
  </code></pre>
  
  <p>I get:</p>
  
  <blockquote>
    <p>TypeError: Only valid with DatetimeIndex, TimedeltaIndex or
    PeriodIndex, but got an instance of 'Index'</p>
  </blockquote>
  
  <p>If I am setting the index with a datetime field, why doesn't the index become a datetime index (or "DatetimeIndex")? Each entry in "date" and the index are both datetime, are they not?</p>
  
  <pre><code>type(df.date[0])
  &lt;type 'datetime.date'&gt;
  
  type(df.index[0])
  &lt;type 'datetime.date'&gt;
  </code></pre>
  
  <p>The way around it is:</p>
  
  <pre><code>df.index=pd.to_datetime(df.index)
  </code></pre>
  
  <p>But I can't find any explanation as to why assigning an existing datetime to the index doesn't work, but converting an existing datetime (df.index) to a datetime via pd.to_datetime(df.index) does.</p>