title: Converting String to Date with SQL in DB2
body: <p>a similar question has been asked, but the examples use different formats so I haven't been able to solve my problem. For some reason, the database my company uses stores dates as the following:</p>
  
  <pre><code>1131112
  1130919
  </code></pre>
  
  <p>The first is November 12, 2013; the second is September 19, 2013. Not sure why there is a 1 at the beginning. I am trying to convert it to mm/dd/yy so I can use VBA to just grab invoices that are within a user specified date.</p>
  
  <p>The code I am using is the following which results in a database error '1004':</p>
  
  <pre><code>SELECT date(translate('xyymmdd',INDATE,'mmddyy')) FROM INVOICED WHERE (INMFGR || INCOLO || INPATT = 'MMMTEST')
  </code></pre>