title: Subtraction of Timestamps teradata
body: <p>I am trying to find difference between 2 timestamps in teradata. I am using the following code:</p>
  
  <pre><code>(date1-date2)day(4) to second  as time_diff
  </code></pre>
  
  <p>This is giving the error: <strong>Interval Field Overflow</strong>. What could be reason for that? Is there some other way to calculate the difference between 2 timestamps?</p>
  
  <p>And when I am using this:</p>
  
  <pre><code>case when(((date2+ INTERVAL '72' hour )-date1) day(4) to second)&gt;0 then '&lt;72 hrs'
  </code></pre>
  
  <p>then the error i am getting is <strong>Invalid operation for DateTime or Interval</strong>.
  Please help</p>