title: date difference in HSQLDB
body: <p>I am converting my oracle query to hsqldb query, i face issue while using date difference in where clause as follows.</p>
  
  <pre><code>select ... where...
  AND  90 - (to_date(sysdate) - to_date(substr(last_accessed_time_stamp,1,instr(last_accessed_time_stamp, ' ')),'YYYY-MM-DD')) in (1,3,5)
  </code></pre>
  
  <p>I need this condition to work in both oracle and hsqldb. Please let me know how it can be done</p>
  
  <p>Thanks in advance.</p>