title: Using date separated colums to compare in mysql
body: <p>I have three columns in a table to save a date, but now I need to compare those three columns as a date using the CONCAT and STR_TO_DATE function, but the comparision does not work, I don't see the error.</p>
  
  <p>Query</p>
  
  <pre><code>SELECT * FROM mytable WHERE STR_TO_DATE(CONCAT(myyear,'-',mymonth,'-',myday),'%Y-%m-%d')&gt;'2015-01-01'
  </code></pre>