I like to show predetermined value in the date field from database.
<?php
@$row=$cond->first_row();
?>
<input type="date" name="dob" value="<?php echo @$row->dob;?> ">
@$row->dob contains the date fetched from database(My SQL).It is stored as DATE. The displayed date should be in editable form.
This code is not showing the value . I am a starter in php!.. Please help...
Try
date( "Y-m-d H:i:s",strtotime( $row->dob ) );
for more detail visit http://php.net/manual/en/function.date.php
Use This
date("Y-m-d H:i:s",strtotime($row->dob))