title: Compare dates between datetimes with Doctrine
body: <p>I have a Symfony2 application with a table that contains a date field, whose type is DateTime.<br />
  I need to get all the entities where that field value is now.</p>
  <p>If I uses the following code, I get 0 results because Doctrine is comparing the DateTime object.</p>
  <pre class="lang-php prettyprint-override"><code>$now = new \DateTime();
  data = $entityRepository-&gt;findByDate($now);
  </code></pre>
  <p>I need to only compare year, month, and day, not hours.</p>
  <p>How can I achieve this?</p>