title: How to select records between two timestamps in oracle
body: <p>I have a table where the column <code>recorded</code>is defined as a <code>timestamp</code> as follows:</p>
  
  <pre><code> TIMESTAMP(6) RECORDED
  </code></pre>
  
  <p>I want to select all the records which have been "recorded" between 2 timestamps . For that I wrote the following query:</p>
  
  <pre><code>    SELECT * FROM myTable WHERE
      recorded BETWEEN 1414794711050 AND 1415399511053;
  </code></pre>
  
  <p>When doing this I am getting an error</p>
  
  <p>ORA-00932: Inconsistent Data types: TIMESTAMP expected, NUMBER got
  00932. 00000 -  "inconsistent datatypes: expected %s got %s"</p>
  
  <p>I also tried with:</p>
  
  <pre><code>    SELECT * FROM myTable WHERE 
      recorded BETWEEN to_timestamp(1414794711) AND to_timestamp(1415399511);
  </code></pre>
  
  <p>How is the way get this query working?</p>