title: getFullYear is not a function
body: <p>I am trying to get the age based on two dates: Date of birth and date of visit. Everytime I try to use <code>getFullYear();</code> in the following manner: I get the error that </p>
  
  <pre><code>var b = getField("dob").value;
  var c = b.getFullYear();
  </code></pre>
  
  <p>I get this error in the console.</p>
  
  <pre><code>b.getFullYear is not a function
  2:Console:ExecException in line 2 of function top_level, script Console:Exec
  
  TypeError: b.getFullYear is not a function
  2:Console:Exec
  undefined
  </code></pre>
  
  <p>What am I doing wrong? I've tried all sorts of ways to make this work and the only thing that does is I use <code>substring()</code> to get the last 4 digits of the date.</p>
  
  <p>The date is formatted as mm\dd\yyyy.</p>
  
  <p>Thanks!</p>