title: Date extraction JavaScript for Acrobat does not work
body: <p>Here's the breakdown:<br>
  <em>What code do I need to extract the <code>12</code>, <code>26</code>, and <code>48</code> from a field whose value is <code>101219488926</code> and then display it in the format <code>MM/DD/YY</code>? (So in this case, the new value would need to be <code>12/26/48</code>)</em></p>
  
  <hr>
  
  <p>Here's the long version:<br>
  I'm using a mag-stripe reader that takes information from the swiped card (a driver license) and then uses that info to auto-populate certain fields in a PDF (first name, last name, date of birth, etc).</p>
  
  <p>Everything works fine, with one exception: the date of birth. Even <strong>that</strong> does <em>technically</em> work, but the value is in this format (assuming the person's DOB is 26 December 1948):</p>
  
  <p>10<strong>121948</strong>89<strong>26</strong></p>
  
  <p>What <em>I</em> need is: the month (<strong>12</strong>), day (<strong>26</strong>), and year (19<strong>48</strong>) stripped out of that long number, then converted to display in the format <code>MM/DD/YY</code></p>
  
  <p>Outside of Acrobat, this seems to work just fine:</p>
  
  <pre><code>var dob = 101219488926;
  trimmonth = dob.substring(2,4);
  trimday = dob.substring(10,12);
  trimyear = dob.substring(6,8);
  dob.value = trimmonth + "/" + trimday + "/" + trimyear;
  </code></pre>
  
  <p>Any suggestions?</p>