title: Getting datetime data into the correct format arcpy python arcmap
body: <p>I am using <code>datetime</code> in <code>Arcpy</code> to convert a <code>"Sample Date"</code> field in a feature class to the day of the year.  The date in the field is in a <code>month/day/year</code> format and it doesn't include any leading zeros (ex. <code>7/8/2018</code> instead of <code>07/08/2018</code>). </p>
  
  <p>Whenever I try running the following line of code,</p>
  
  <pre><code>dtm = datetime.datetime.strptime(row, '%Y/%m/%d %H:%M')
  </code></pre>
  
  <p>I get the following error:</p>
  
  <p><code>ValueError: time data '[datetime.datetime(2003, 6, 3, 0, 0)]' does not match format '%Y/%m/%d %H:%M'</code>  </p>
  
  <p>The sample date field that I am using does not include any time data which I believe is where the two zeros at the end of the error message are coming from.  I just assumed that they were hours and minutes but I am not sure.  </p>
  
  <p>Does anyone know what the zeros are so that I can change my code to fit the correct format or how I can avoid the zeros altogether?  I tried <code>datetime.date</code> instead of <code>datetime.datetime</code> as well and still had complications.  I can post the long version of the code if needed but the code that I provided is the cause of the error message. I have included the link of the <code>datetime</code> reference I used. The website is for <code>strftime</code> not <code>strptime</code> but I believe that it works the same. Trying <code>strftime</code> throws an error as well. Link: <a href="http://strftime.org/" rel="nofollow noreferrer">http://strftime.org/</a></p>