title: Python- strptime ValueError unconverted data remains: :00
body: <p>I have a .csv file with a column that have dates which looks like "2/15/2016  1:44:00 PM",am running into following error with the code below...can anyone provide inputs on what is wrong?</p>
  
  <p>CODE:-</p>
  
  <pre><code>import csv
  import datetime as dt
  import os
  
  File = 'C:/Users/Alan Cedeno/Desktop/Test_Folder/HiSAM1_data_160215_164858.csv'
  root, ext = os.path.splitext(File)
  output = root + '-new.csv'
  with open(File,'r') as csvinput,open(output, 'w') as csvoutput:
  
      writer = csv.writer(csvoutput, lineterminator='\n')
      reader = csv.reader(csvinput)
  
      all = []
      row = next(reader)
      for line in reader:
          row.append(dt.datetime.strptime(line[0],'%m/%d/%Y %H:%M').time())
          all.append(row)
  
      for row in reader:
          row.append(row[0])
          all.append(row)
  
      writer.writerows(all)
  </code></pre>
  
  <p>ERROR -</p>
  
  <pre><code>ValueError                                Traceback (most recent call last)
  c:\users\alance~1\appdata\local\temp\tmpujjfa2.py in &lt;module&gt;()
       14         row = next(reader)
       15         for line in reader:
  ---&gt; 16             row.append(dt.datetime.strptime(line[0],'%m/%d/%Y %H:%M'))
       17             all.append(row)
       18 
  
  C:\Users\Alan Cedeno\AppData\Local\Enthought\Canopy\App\appdata\canopy-   1.6.1.3253.win-x86_64\lib\_strptime.pyc in _strptime(data_string, format)
      326     if len(data_string) != found.end():
      327         raise ValueError("unconverted data remains: %s" %
  --&gt; 328                           data_string[found.end():])
      329 
      330     year = None
  
  ValueError: unconverted data remains: :00 
  </code></pre>
  
  <p>Here is a screenshot of the Data-</p>
  
  <p><a href="https://i.stack.imgur.com/d7yCk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/d7yCk.png" alt="enter image description here"></a></p>