Parsing date object in JavaScript
<pre><code>var formattedDate = new Date(parseInt(thisObj.Patient.DateOfBirth.substr(6)));
</code></pre>

<p>When i print my Date Object, i get this as output.     </p>

<pre><code>Wed May 04 2011 09:30:00 GMT+0530 (GMT+05:30)
</code></pre>

<p>How can i separate May, 04 and 2011 into separate variables like </p>

<pre><code>var Month = May;
var Date = 04;
var Year = 2011;
</code></pre>

<p>How i can also check whether the Age of the person is below one year or not. </p>
