title: Sysdate vs Timestamp for comparisons
body: <p>I'm checking for product updates that are dependent on time of day - alerting if a product has not updated in the last 2 hours , e.g.:<br></p>
  
  <p>03:30 - 07:29 we expect only product x to be updating;<br>
  07:30 - 11:29 we expect both product x and y to be updating<br>
  11:30 - 15:30 we expect only product y to be updating<br></p>
  
  <p>But we need to be sensitive to products that have not updated <em>yesterday</em> and still have not updated <em>today</em>. Thus my question - when doing the below timestamp comparisons for product y, I suspect that date is not factored in and therefore a product that hadn't updated potentially gets ignored.</p>
  
  <pre><code>(...)
  AND inv.timestamp      &lt; sysdate        - (120 / 1440) --older than two hours
  AND inv.timestamp      &gt; TRUNC(sysdate) + (690/1440)   --after 11:30
  AND inv.timestamp      &lt; TRUNC(sysdate) + (930/1440)   --before 15:30
  (...)
  </code></pre>
  
  <p>inv.timestamp is a column in timestamp(6) type. Does trunc(sysdate) implicitly include the present date for comparison or is it only using the time?</p>