Javascript date format 2012-04-01T23:00:00Z
<p>I have the the following date format in my jQuery. But when I try to do a dateparse using the datepicker it states that the object is not supported. I take it that the date format is incorrect.</p>

<p>The following line works fine in Chrome and Firefox but not in IE. I get NaN returned as a result:</p>

<pre><code>var newdate = getNewDate(value);

function getNewDate(dateValue) {
    var newDate = new Date(dateValue);
    var cDate  = newDate.getDate();
    var cMonth = newDate.getMonth() + 1; // have to add one as January starts from 0
    var cYear = newDate.getFullYear();

    return cDate + "/" + cMonth + "/" + cYear;
};
</code></pre>

<p>When I do <code>getDate</code> it returns <code>NaN</code> for each of the gets, i.e. <code>getDate</code>, <code>getMonth</code> and <code>getFullYear</code>.</p>

<p>All I require is to get the date and return in this format <code>dd/mm/yyyy</code></p>

<p>Any ideas?</p>
