php date() mysql format code example
Example 1: php mysql date format
date("Y-m-d H:i:s")
Example 2: format date in php
$myDateTime = DateTime::createFromFormat('Y-m-d', $dateString);
$newDateString = $myDateTime->format('d-m-Y');
date("Y-m-d H:i:s")
$myDateTime = DateTime::createFromFormat('Y-m-d', $dateString);
$newDateString = $myDateTime->format('d-m-Y');