title: Javascript Change Database datetime to HTML input datetime
body: <p>I am getting the following datetime from the database</p>
  <pre><code>2021-09-25T17:04:53.177Z
  </code></pre>
  <p>But the Date input required the format in this format.</p>
  <pre><code>2021-09-22T14:04
  </code></pre>
  <p>The Error I get</p>
  <blockquote>
  <p>The specified value &quot;Sun Oct 17 2021 02:27:28 GMT+0530 (India Standard
  Time)&quot; does not conform to the required format.  The format is
  &quot;yyyy-MM-ddThh:mm&quot; followed by optional &quot;:ss&quot; or &quot;:ss.SSS&quot;.</p>
  </blockquote>
  <p>Whats the best way to convert the datetime back and forth to these formats?</p>