title: How to select N characters from an AS400/DB2 Database Column
body: <p>I have an AS400/DB2 Database, with a column of type character. This column represents a date, example:</p>
  
  <pre><code>COLUMNDATA
  20091101
  20091201
  20100101
  ... etc.
  </code></pre>
  
  <p>I want to select on one hand the "year" (first 4 characters), and on the other, the "month" (the following two characters).</p>
  
  <p>How can I do this?</p>