Convert the format yyyy-MM-ddTHH:mm:ss to datetime in javascript which is acceptable by getTime() function
<p>I have a date in the format <strong>yyyy-MM-ddTHH:mm:ss</strong> and I want to convert it to datetime format in such a way that if the result is evaluated via <strong>getTime()</strong> method, it will return number of milliseconds. For now, the method I have tried is throwing the error : <strong><em>Uncaught TypeError: dt.getTime is not a function</em></strong> where <strong><em>dt</em></strong> is the resultant date. Please state a way to achieve this using javascript.</p>

<p>Thanks in advance.</p>