title: Delete records that are older than a day
body: <p>I have a table of links. If the link was generated and then the next day it is still in the table than I want to delete it. If there are multiple rows I want to remove each row.My query is: </p>
  
  <pre><code>DELETE FROM resetpassword WHERE expiry_timestamp &lt; DATEADD(day, -1, GETDATE())
  </code></pre>
  
  <p>but this gives me an error: </p>
  
  <pre><code>com.web.command.exceptions.DatabaseException:
    "DAY" is not valid in the context where it is used.
  </code></pre>
  
  <p>How do I remove all rows that are a day old?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p><code>expiry_timestamp</code> is a <code>timestamp</code> so I think the query should be something like the below, but I still can't get it to work.</p>
  
  <pre><code>select * from resetpassword
  where timestamp(expiry_timestamp) = timestamp(current date) - 1 days 
  </code></pre>