如何从mysql中提取datetime字段的值

I have the below input fields and I am trying to pull in the datetime from start_date and end_date from my database. however when I do the code as shown below it just pulls in blank dates. I checked the values of the $start_date and $end_date and they are valid. Please let me know what could be wrong.

echo 'Start Date:'
    , '<input id="evfinal" type="datetime-local" name="sdate" value="' . $row['start_date'] . '" />'
    , 'End Date:','<input id="evfinal" type="datetime-local" name="edate" value="' . $row['end_date'] . '" />';

code to pull data:

$result = mysql_query("SELECT a.* FROM events a INNER JOIN (SELECT id_user, MAX(event_id) as maxID FROM events GROUP BY id_user) b ON a.id_user = b.id_user AND a.event_id = b.maxID WHERE a.id_user = '25'")
or die(mysql_error()); 


// store the record of the "example" table into $row
while($row = mysql_fetch_array($result)){

Try this way: value="<?php echo $row['start_date']; ?>" Avoid printing static html codes with php as possible as.