title: Using Hibernate @Formula for finding time difference
body: <p>I'm using Hibernate @Formula to find the time difference between 2 columns</p>
  
  <pre><code> @Formula("(sysdate-creation_date) * 86400")
   private long elapsedTime;
  </code></pre>
  
  <p>This gives elapsedTime in days if I run the query on Oracle but while doing unit testing using HSQL DB, it gives elapsedTime in milliSeconds. Is there any way I can make this formula work on both Oracle and HSQLDB ? For my use case , I want elapsed time in seconds</p>