title: Convert DD-MM-YYYY format to MM-DD-YYYY in moment.js
body: <p>I am trying to convert a date from <strong>DD-MM-YYYY</strong> to <strong>MM-DD-YYYY</strong>. But it doesn't work for me. I tried this</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var test = Date.parse('15-06-2010');
  var SearchDate = moment('15-06-2010').format("MM-DD-YYYY");
  
  var day = moment(new Date("15-06-2010"), "MM-DD-YYYY");
  
  console.log(test);
  console.log(day);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.5.1/moment.min.js"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Help me.</p>