title: SQL query to return the rows between two dates
body: <p>I am using this query to get the rows between two dates but I don't get the rows from the database, it returns an empty set (in db I have rows for that day)</p>
  
  <p>Query:</p>
  
  <pre><code>select email 
  from users
  where date_email_sent between '17-May-12' AND '17-May-12'
  </code></pre>
  
  <p>When I try the query below I am getting 17th row alone </p>
  
  <p>Query:</p>
  
  <pre><code>select email
  from users
  where date_email_sent between '17-May-12' AND '18-May-12'
  </code></pre>
  
  <p>Can any one plz suggest me how to get 17th records alone if start date and end date as same.</p>
  
  <p>Thanks in advance.</p>