title: How to set the HTML datetime input a value by default
body: <p>For example, I have a textbox in which I want to set by default a value from database. I can do it like this:</p>
  
  <pre><code>&lt;input type="text" name="abcd" value="&lt;?=@$result['xyz'];?&gt;"/&gt;
  </code></pre>
  
  <p>Ok, it works for this type of field.</p>
  
  <p>But, I want to do it for a date-time field like this:</p>
  
  <pre><code>$datetime = $result['datetime']; 
  //already converted to format("d/m/Y, h:i:s A")
  &lt;input type="datetime-local" value="&lt;?=@$datetime?&gt;" name="abc"/&gt;
  </code></pre>
  
  <p>I've already tried converting the database date-time format to fit this format. No result.</p>
  
  <p>Ideas? Thanks!</p>