title: Compare dates in MySQL
body: <p>I want to compare a date from a database that is between 2 given dates.
  The column from the database is DATETIME, and I want to compare it only to the date format, not the datetime format.</p>
  
  <pre><code>SELECT * FROM `players` WHERE CONVERT(CHAR(10),us_reg_date,120) &gt;= '2000-07-05' AND CONVERT(CHAR(10),us_reg_date,120) &lt;= '2011-11-10'
  </code></pre>
  
  <p>I get this error when I execute the SQL above:</p>
  
  <blockquote>
    <p>You have an error in your SQL syntax;
    check the manual that corresponds to
    your MySQL server version for the
    right syntax to use near
    'us_reg_date,120) >= '2000-07-05' AND
    CONVERT(CHAR(10),us_reg_date,120) &lt;=
    '2011-' at line 1</p>
  </blockquote>
  
  <p>How can this problem be fixed?</p>