title: using DATE_ADD from db2 to mysql
body: <p>In my php script i have the following query:</p>
  
  <pre><code>SELECT 
       inv as INVOICE,
       shpdate as SHIPDATE
    FROM table1
      WHERE to_date(char(shpdate), 'YYYYMMDD') &gt;= '2018-01-01'
  </code></pre>
  
  <p>which returns records successfully. This is taking a packed value and returning it to match the YYYY-MM-DD format.</p>
  
  <p>I'm trying to add an interval and insert to mysql like so:</p>
  
  <pre><code>INSERT INTO table (column1)
      values(DATE_ADD(DATE_FORMAT(CONVERT(:SHIPDATE, CHAR(20)), '%Y-%m-%d'),INTERVAL 127 DAY) as expire_date)
  </code></pre>
  
  <p>But when I run this it says it is not a valid function. I know the query is successful, but the insert is failing, most likely because I'm not using the DATE-ADD correctly for some reason.</p>
  
  <p>Any help on how to change this insert syntax is much appreciated.</p>