title: How can I add Year, Month, Day, Hour, Minute, Second to mysql date using date_add?
body: <p>What is the best way to add to a datetime type column in mysql database? I tried using DATE_ADD but it only works when I add single date/time like:</p>
  
  <pre><code>DATE_ADD(start_date, INTERVAL :dayCount DAY)
  </code></pre>
  
  <p>This does NOT Work:</p>
  
  <pre><code>DATE_ADD(DATE_ADD(start_date, INTERVAL :dayCount DAY), INTERVAL :hourCount HOUR)
  </code></pre>
  
  <p>I tried adding microseconds as suggested by some:</p>
  
  <pre><code>$startMicro = strtotime($startDiff-&gt;format("%Y-%m-%d %H:%i:%s")) * 1000; // 943920000000
  start=DATE_ADD(start, INTERVAL :startMicro MICROSECOND)
  </code></pre>
  
  <p>I DID THIS IN THE END AND IT WORKS:
  in PHP:
      $minutesDiff = (strtotime($start) - strtotime($row->start)) / 60;
  in SQL STATEMENT:
      start=DATE_ADD(start, INTERVAL :minutesDiff MINUTE)</p>
  
  <p>Thanks all for the help.</p>