title: When I enter a dateadd or datediff code i get this error all the time "ORA-00904 "DATEADD" INVALID IDENTIFIER."
body: <p>I have a university project and I have a patient table with admission and discharge date attributes. I need to delete records that are older than 7 years, I used the following code :</p>
  
  <pre><code>delete from patient
  where dis_date &gt;= datedadd(yy,-7,getdate());
  </code></pre>
  
  <p>I get the error </p>
  
  <blockquote>
    <p>"ORA-00904: "DATEADD" invalid identifier"</p>
  </blockquote>
  
  <p>. It's the same with the DATEDIFF function. Any alternatives please?</p>