title: Matplotlib and Python: How to format datetime from given string?
body: <p>I want to make a plot with matplotlib, that looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/CtgeH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CtgeH.png" alt="screenshot"></a></p>
  
  <p>The problem is I am getting the data from mySQL and the date is a string therefore. I want to assign a date to each y-value. The current date format is like that: <code>Y-M-d h:m:s</code></p>
  
  <p>Can you help me with how I must format this into a valid datetime, or is it possible to plot strings on x-axis and float on y-axis?</p>