Get the only date from date time in database
Real Datetime shows like – yyyy-mm-dd hh:mm:ss
And Now you can break and get the part of the date, time as per your requirement.
$dd = substr($date, 8,2);
$mm = substr($date, 5,2);
$yyyy = substr($date, 0,4);
$newdate = “$dd-$mm-$yyyy”;
And you can show your result anywhere on your web page like –
newdate = dd-mm-yyyy