In the code below I tried to display datetime value from DB in input which it's type is datetime. The problem is that I dont know what is the correct format to do so.
<input class="form-control" name="date_to_discuss" id="date_to_discuss" type="datetime-local"
value="<?php echo date_format($proposal["Date_To_Disscus"], 'Y-m-dTH:i:s');?>" />
I tried to look for answers in the internet but it was useless..
Try this:
<?php
$proposal["Date_To_Disscus"] = '2017-04-12';
?>
<input class="form-control" name="date_to_discuss" id="date_to_discuss" type="datetime-local"
value="<?php echo strftime('%Y-%m-%dT%H:%M:%S', strtotime($proposal["Date_To_Disscus"]));?>" />
OUTPUT:
2017-04-12T00:00:00