title: How to convert a string Serie to datetime with and without time
body: <p>When converting a <code>Series</code> from <code>string</code> to <code>datetime</code> using <code>astype</code> function, if the string doesn't have the time component, it assumes different behaviors when converting and swaps month and day in the same <code>Series</code>. What is the correct way of converting the <code>Series</code>?</p>
  
  <pre><code>df_date=pd.DataFrame(['12/07/2013 21:50:00','13/07/2013 00:30:00','15/07/2013','11/07/2013'], columns=['Date'])
  
  print(df_date.Date.dtype)
  
  df_date.Date = pd.to_datetime(df_date.Date, format="%d/%m/%Y %H:%M:%S", exact=False, dayfirst=True, errors='ignore')
  
  print(df_date.Date.dtype)
  
  df_date
  </code></pre>
  
  <h1>OUTPUT:</h1>
  
  <pre><code>    Date
  
  0   12/07/2013 21:50:00
  1   13/07/2013 00:30:00
  2   15/07/2013
  3   11/07/2013
  </code></pre>
  
  <p>When doing:</p>
  
  <pre><code>df_date.Date = df_date.Date.astype('datetime64')
  </code></pre>
  
  <p>it becomes of datetime type:</p>
  
  <pre><code>print(df_date.Date.dtype)
  </code></pre>
  
  <p>but when converting it has two different behaviours:</p>
  
  <pre><code>df_date
  </code></pre>
  
  <h1>OUTPUT:</h1>
  
  <pre><code>    Date
  
  0   2013-12-07 21:50:00
  1   2013-07-13 00:30:00
  2   2013-07-15 00:00:00
  3   2013-11-07 00:00:00
  </code></pre>
  
  <p>The expected result in my mind would be:</p>
  
  <pre><code>    Date
  0   2013-07-12 21:50:00
  1   2013-07-13 00:30:00
  2   2013-07-15 00:00:00
  3   2013-07-11 00:00:00
  </code></pre>
  
  <p>Instead of swapping the day and month on rows 0 and 3.</p>