title: python datetime swapping day month
body: <p>I have a date time object that looks like:</p>
  
  <pre><code>2015-31-12 00:34:00
  </code></pre>
  
  <p>where the second element (31) represents the day and the third element (12) represents the month. How do I swap day and month so that the date looks like:</p>
  
  <pre><code>2015-12-31 00:34:00
  </code></pre>