title: MySQL STR_TO_DATE() function returns null
body: <p>I wanted to convert my date format From <code>MMMM dd,yyyy</code> to <code>yyyy-MM-dd</code>.</p>
  
  <p>I tried using the following:</p>
  
  <pre><code>SET @dt_to = STR_TO_DATE(dateTo, '%d-%m-%Y');
  </code></pre>
  
  <p>but returns a <code>NULL</code> value.</p>
  
  <p>How will I convert my date to <code>yyyy-MM-dd</code> format in MySQL?</p>
  
  <p><strong>EDITED:</strong></p>
  
  <p>I am creating a procedure in which the value of <code>dateTo</code> was received in the parameter. It is a date in <code>MMMM dd, yyyy</code> format. E.g. <code>October 10, 2015</code>.</p>
  
  <p><strong>NOTE:</strong></p>
  
  <p>The whole query does not return <code>NULL</code> when I use:</p>
  
  <pre><code>SET @dt_to = dateTo;
  </code></pre>