title: JPA 2.0 Date Comparsin JPA query
body: <p>I am trying to execute following query, but its throwing error. </p>
  
  <pre><code>SELECT t from Table t where t.status = :status and t.ndate &gt; (t.ndate - 12/24) AND t.ndate &lt; (t.ndate + 12/24)
  </code></pre>
  
  <p>Error</p>
  
  <pre><code>ERROR: Filter invalid. Cannot compare field ndate of type java.util.Date to value of type long. Numeric comparisons must be between numeric types only
  </code></pre>
  
  <p>Do we any other way to do this?</p>