title: How to Compare and fetch date in Cakephp?
body: <p>I am trying to make an availability calendar and need to know how can I compare dates when fetching it.</p>
  
  <p>My DB is </p>
  
  <pre><code>id
  start_date
  end_date
  status
  </code></pre>
  
  <p>Now suppose I want to fetch booking in next the month, i.e. from 2010-03-01 to 2010-04-01. How should I fetch this data? I did try comparing directly using an and condition but it didn't help.</p>
  
  <p>The format in the DB is yyyy-mm-dd and I used the same to compare. But direct comparison does not work.</p>