title: how to get the difference between 2 dates with Dql
body: <p>How can I get the difference between 2 dates with Dql?</p>
  
  <p>I have tried the following code, but that didn't work.</p>
  
  <pre class="lang-php prettyprint-override"><code>$query =$this-&gt;_em-&gt;createQuery('select a,DATEDIFF(d,\'now\',a.date) from ABundle:Abonment a where d==1');
  </code></pre>
  
  <p>How can I solve this?</p>