title: Algorithm to convert int to 6 character alphanumeric string
body: <p>I have an ID field that automatically increments by 1 when a new record is added. Rather than use the numeric ID as is, I would like to convert it to a 6 character string made up of 0-9A-Z (no lowercase letters) with the following format:</p>
  
  <pre><code>A00000
  </code></pre>
  
  <p>The numbers should increment from 0-9 then A-Z.</p>
  
  <p><strong>Examples</strong></p>
  
  <p>If I were to encode the number <code>7</code> for example, it should return: </p>
  
  <pre><code>A00007
  </code></pre>
  
  <p>If I encode the number <code>13</code> it should return:</p>
  
  <pre><code>A0000D
  </code></pre>
  
  <p>If I encode the number <code>36</code> it should return:</p>
  
  <pre><code>A00010
  </code></pre>
  
  <p>Hopefully this makes sense. Any help would be greatly appreciated.</p>