title: Difference between current date and date stored in database not working
body: <p>I have a table which contain a column named <code>timestamp</code> which stores created datetime of the record in seconds(convert the datetime value from Date() using strtotime()). I need to get the records whose created date is greater than 72 hours in order to delete those records.</p>
  
  <p>My table has following columns:</p>
  
  <pre><code>userid(int)
  timestamp(storing created dates in seconds)eg:'1427886372'
  </code></pre>
  
  <p>I have used the following query</p>
  
  <pre><code>SELECT DATEDIFF(HOUR,timestamp,'current date in seconds')&gt;72 FROM table_name.
  </code></pre>
  
  <p>Its not working. I would also like to know, if there is any option to convert the result of <code>GETDATE()</code> to seconds in sql just like <code>strtotime()</code> in php since I am getting the current date using php <code>Date()</code> and converting it to seconds using <code>strtotime()</code>.</p>
  
  <p>**EDIT:**According to kba's answer I have modified the query like this.</p>
  
  <pre><code>SELECT * FROM PRTL_UsrHashKeys where 
  DATEDIFF(HOUR,timestamp, DATEDIFF(second, '1970-01-01', GETDATE()))&gt;72
  </code></pre>
  
  <p>But its showing <code>An expression of non-boolean type specified in a context where a condition is expected, near ')'.</code></p>