title: How to convert a string date format `October 18th 2019` into a valid date `2019-10-17T23:00:00.000Z`
body: <p>I need to convert a string date format like this <code>October 18th 2019</code> ('MMMM Do YYYY') into a valid date <code>2019-10-17T23:00:00.000Z</code> or similar <code>17/10/2019</code></p>
  
  <p>i have tried using parsing the string into moment but i keep getting errors</p>
  
  <p>update: I used <code>moment('October 18th 2019').format()</code>. received invalid date as the error, sorry I should clarify i'm trying to convert the string <code>October 18th 2019</code> into a valid date format, </p>