title: Using INTERVAL in PostgreSQL to add hours date/time
body: <p>Here is the code in PostgreSQL I am trying to run:</p>
  
  <pre><code>select DATE_ADD(whenbooked,INTERVAL 4 HOUR) from booking WHERE id = 12310;
  </code></pre>
  
  <p>OR I try to run this code:</p>
  
  <pre><code>select DATE_ADD('2010-11-19 01:11:22',INTERVAL 4 HOUR)
  </code></pre>
  
  <p>Both codes access date/time stored in the same manner:            </p>
  
  <blockquote>
    <p>2010-11-19 01:11:22</p>
  </blockquote>
  
  <p>PostgreSQL error code is this:</p>
  
  <blockquote>
    <p>ERROR: syntax error at or near "4"</p>
  </blockquote>
  
  <p>it is referring to the '4' in the line 'INTERVAL 4 HOUR'.</p>
  
  <p>I can't figure out what the issue is. </p>
  
  <p>I need to compare a time/stamp (written in exactly the same format as above) with the stored time/date PLUS 4 hours.
  So the desired end result is to return: <code>'2010-11-19 05:11:22'</code>.</p>
  
  <p>If this can be done in PHP or directly in SQL?</p>