title: How to convert date into "2015-05-14T23:00:00" format - Jquery
body: <p>I'm trying to convert a date string into the above format:</p>
  
  <pre><code>var today = new Date();
  today.getDate() - 7; //gives me 14 - considering today is May21
  data['startDate'] = today.getDate() - 7; //now data['startDate'] = 14;
  </code></pre>
  
  <p>how can i convert this <code>14</code> into <code>2015-05-14T23:00:00</code>format??</p>
  
  <p>thanks!</p>