title: MYSQL search between two date
body: <p>I have 2 dates in database like this:</p>
  
  <pre><code>from_dateTime = 2013-06-12
  to_dateTime   = 2013-07-10
  </code></pre>
  
  <p>I want to search all records between <code>from_dateTime</code> and <code>to_dateTime</code>. I tried to use following code in mysql:</p>
  
  <pre><code>SELECT *
  FROM users i
  WHERE i.from_dateTime &gt;= '2013-06-12' AND i.to_dateTime &lt;= '2013-07-10'
  </code></pre>
  
  <p>But it doesn't work as I expected. Why am I getting empty result set?</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <pre><code>from_dateTime = 2013-06-11
  to_dateTime   = 2013-06-12
  </code></pre>
  
  <p>SQL:</p>
  
  <pre><code>SELECT * FROM users i WHERE  NOW() between i.from_dateTime AND i.to_dateTime 
  </code></pre>
  
  <p><code>NOW()</code> is <code>2013-06-12 08:17:13</code> and command cant find my record too.</p>