title: Convert datetime to valid JavaScript date
body: <p>I have a datetime string being provided to me in the following format:</p>
  
  <pre><code>yyyy-MM-dd HH:mm:ss
  2011-07-14 11:23:00
  </code></pre>
  
  <p>When attempting to parse it into a JavaScript <code>date()</code> object it fails. What is the best way to convert this into a format that JavaScript can understand?</p>
  
  <p>The answers below suggest something like</p>
  
  <pre><code>var myDate = new Date('2011-07-14 11:23:00');
  </code></pre>
  
  <p>Which is what I was using. It appears this may be a browser issue. I've made a <a href="http://jsfiddle.net/czeBu/" rel="noreferrer">http://jsfiddle.net/czeBu/</a> for this. It works OK for me in <a href="http://en.wikipedia.org/wiki/Google_Chrome" rel="noreferrer">Chrome</a>. In Firefox 5.0.1 on OS&nbsp;X it returns <code>Invalid Date</code>.</p>