title: Can't execute string to date conversion
body: <p>Could anyone point what to read, because I'm stuck with trivial issue. I store data in JSON format and I have a key with string that consists of a non ISO format datetime value, e.g. <code>'%d-%m-%Y %H:%i:%S'</code></p>
  
  <p>I've tried function <code>STR_TO_DATE</code> on string "17-12-2019 13:49:50" and it returned SQL datetime result, but when I use it in function</p>
  
  <pre><code>DELETE FROM queue WHERE 
      ts = CASE 
      WHEN type = 'entry' THEN HOUR(TIMEDIFF (NOW(), STR_TO_DATE(JSON_EXTRACT(request, "$.date_event"),'%d-%m-%Y %H:%i:%S'))) &gt; 72
  </code></pre>
  
  <p>SQL raises </p>
  
  <blockquote>
    <p>Incorrect datetime value: '"07-12-2016 18:21:59"' for function
    str_to_date</p>
  </blockquote>
  
  <p>When I try statement <code>SELECT  STR_TO_DATE(JSON_EXTRACT(request, "$.date_event"),'%d-%m-%Y %H:%i:%S')</code> MySQL returns <code>null</code></p>