title: Python DateUtil Converting string to a date and time
body: <p>I'm trying to convert a parameter of type string to a date time. I'm using the dateUtil library</p>
  
  <pre><code>  from dateutil import parser
  myDate_string="2001/9/1 12:00:03"
  dt = parser.parse(myDate_string,dayfirst=True)
  print dt
  </code></pre>
  
  <p>every time i run this i get </p>
  
  <blockquote>
    <p>2001-09-01 12:00:03</p>
  </blockquote>
  
  <p>regardless of whether i have dayfirst set as true or Year first set as false. Ideally I just want to have a date in the format DD-MM-YYYY HH:MM:SS. I don't want anything fancy. I am willing to use the datetime library but this doesn't seem to work at all for me. Can anyone give simple expamples of how to convert strings to date time with an explicit format, I'm a noob, so the most basic examples are all i require. I'm using Python 2.7</p>