Why doesn't this new Date work in javascript?
<p>I'm trying to display a date with format "MMM. dd HH:mm:ss.nnn". It is rendering it incorrectly in IE and I have spent quite some time and I can't figure out why I can't get this to work.</p>

<p>I know that Date.UTC returns the number of miliseconds in a Date object since Jan 1, 1970. So, </p>

<pre><code>var newDate = new Date(Date.UTC(year, month[, date[, hrs[, min[, sec[, ms]]]]])
newDate.toString("MMM. dd HH:mm:ss.")+row.timestamp.getMilliseconds();
</code></pre>

<p>will work.</p>

<p>Example:</p>

<pre><code>var newDate = new Date(Date.UTC(1950, 10, 10, 10, 09, 09, 100));
row.timestamp_f = newDate.toString("MMM. dd HH:mm:ss."); // Output =&gt; Nov. 10 05:09:09.
</code></pre>

<p>But, I am interating this from a jquey.each function so the date string that I am working with is an ISO 8601: "2013-03-12T15:14:10.483". So, this is what I have in mind.</p>

<pre><code>var numMilisecond = Date.parse(row.timestamp);
var newDate = new Date(numMilisecond);
row.timestamp_f = newDate.toString("MMM. dd HH:mm:ss."); // Output =&gt; Dec. 31 19:00:00.
</code></pre>

<p>row.timestamp is from a JSON response</p>

<pre><code>{"timestamp":"2013-03-12T15:14:10.483" ...}
</code></pre>

<p>Why doesn't the code work? Date.parse should return the number of miliseconds since Jan 1, 1970 and then I create a new Date obj and then convert it to string just like the code in the first snipet. What am I doing wrong?</p>

<p>Thanks.</p>
