How to split an array index
<p>how to split an array index i.e.. sample code</p>

<pre><code>var parts = currentVal.split(" ");
var datePart = parts.splice(0,1);
alert("Date: " + datePart );
var timePart = parts.join(' ');
</code></pre>

<p>here i am validating the date time regular expression. var datePart is an  array index, now i want to split datepart ....</p>

<pre><code>var parts1 = datePart.split('/');
parts1.date = parseInt(parts1[0]);
parts1.month = parseInt(parts1[1]);
parts1.year = parseInt(parts1[2]);  
</code></pre>

<p>but it is showing uncaught type error, their is no method split(); Can any one help me how do i separate date, month, year.</p>
