title: How to add number of days in postgresql datetime
body: <p>I have a following table <code>projects</code>.</p>
  <pre><code>id title        created_at               claim_window
  1  Project One  2012-05-08 13:50:09.924  5
  2  Project Two  2012-06-01 13:50:09.924  10
  </code></pre>
  <p>A) I want to find the deadline with calculation <code>deadline = created_at + claim_window(No. of days)</code>.</p>
  <p>Something like following.</p>
  <pre><code>id title        created_at               claim_window  deadline
  1  Project One  2012-05-08 13:50:09.924  5             2012-05-13 13:50:09.924
  2  Project Two  2012-06-01 13:50:09.924  10            2012-06-11 13:50:09.924
  </code></pre>
  <p>B) I also want to find the projects whose deadline is gone</p>
  <pre><code>id title        created_at               claim_window  deadline
  1  Project One  2012-05-08 13:50:09.924  5             2012-05-13 13:50:09.924
  </code></pre>
  <p>I try something like following.</p>
  <pre><code>SELECT * FROM &quot;projects&quot; 
  WHERE (DATE_PART('day', now()- created_at) &gt;= (claim_window+1))
  </code></pre>
  <p>But for some reason it is not working.</p>