title: Write out Date without time from excel file using Python
body: <p>I'm reading in an excel file and unioning it to a csv file. </p>
  
  <p>When I read in the excel file I have a field of dates:</p>
  
  <pre><code>0    2018-05-28 00:00:00
  1    9999-12-31 00:00:00
  2    2018-02-26 00:00:00
  3    2018-02-26 00:00:00
  4    2018-02-26 00:00:00
  Name: Date_started, dtype: object
  </code></pre>
  
  <p>I check the data type</p>
  
  <pre><code>df['Date_started'].dtype
  dtype('O')
  </code></pre>
  
  <p>Then when I write out the resultant dataframe to csv I get this:</p>
  
  <pre><code>df.to_csv(folderpath + "Date_Started_df.csv",encoding="UTF-8" , index=False, na_rep='',date_format='%d%m%Y')
  Date_Started
  
  28/05/2018 00:00
  31/12/9999 00:00
  26/02/2018 00:00
  26/02/2018 00:00
  26/02/2018 00:00
  </code></pre>
  
  <blockquote>
    <p>I have tried</p>
  </blockquote>
  
  <pre><code>df.loc[:,'Date_Started'] = df['Date_Started'].astype('str').str[8:10] + "/" + 
  df['Date_Started'].astype('str').str[5:7] + "/" + 
  df['Date_Started'].astype('str').str[:4] 
  </code></pre>
  
  <p>Which gave me:</p>
  
  <pre><code>0    28/05/2018
  1    31/12/9999
  2    26/02/2018
  3    26/02/2018
  4    26/02/2018
  Name: Date_started, dtype: object
  </code></pre>
  
  <p>I thought it might be in the writing out:</p>
  
  <pre><code>df.to_csv(filename, date_format='%Y%m%d')
  </code></pre>
  
  <p>but I still got the times!?</p>