title: How to convert "DD-MMM-YYYY" string to date
body: <p>How to convert a "DD-MMM-YYYY" string to a date in Jquery?</p>
  
  <p>I've a date in string "14-Jun-2014". I want to convert it to a date; something like this <code>14-06-2014</code>. For <code>$("#InvoiceToDate").text();</code> I get this <code>"14-Jun-2014"</code></p>
  
  <p>So for</p>
  
  <pre><code>new Date($("#InvoiceToDate").text()) 
  </code></pre>
  
  <p>But its showing </p>
  
  <pre><code>Sat Jun 14 2014 00:00:00 GMT+0600 (Bangladesh Standard Time)
  </code></pre>
  
  <p>I've also tried this</p>
  
  <pre><code>new Date($("#InvoiceToDate").text()).toLocaleString('en-GB');
  </code></pre>
  
  <p>Now its showing almost what I wanted.</p>
  
  <pre><code>"06/08/2014 00:00:00"
  </code></pre>
  
  <p>How can I get only dd/MM/yyyy. Please help.</p>