title: Javascript - Create new Date using a UK format and moment.js
body: <p>I have a date in UK format "DD/MM/YYYY HH:mm" and I want to create a new date with javascript. I'm trying the following using moment.js but it doesn't recognise the timepart and simply adds on the current time.</p>
  
  <pre><code> var myDate = "11/10/2016 09:00"
  
   // The toDate() is equivalent to the javascript new Date() function
   var newDate = moment(myDate, "YYYY-MM-DD HH:mm").val()).toDate();
  
   // output:
   // 20161011T091406Z 
   // Tue Oct 11 2016 09:14:06 GMT+0100
  </code></pre>
  
  <p>As you can see its changed the time part to the time the script is run.</p>