How should I instantiate this date in javascript?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/4503504/format-date-in-javascript">Format Date in Javascript</a>  </p>
</blockquote>



<p>I have this date:</p>

<pre><code>var newDate = "/Date(1333609200000)/";
</code></pre>

<p>And what I need to do to it is:</p>

<pre><code>var myDate = new Date(1333609200000);
</code></pre>

<p>I thought about just trimming off <code>"/Date()/"</code> and then getting just the number inside but I wasn't sure if that would be best here. Should I just simply regex the number out of that? Is there a better approach?</p>

<p>Notes: The date is being created by c#'s <code>JavascriptSerializer</code> and comes in the format <code>newDate</code> above. It cannot be changed in c# due to constraints.</p>
