php date format for mysql code example
Example 1: php mysql date format
date("Y-m-d H:i:s")
Example 2: format('Y-m-d H:i:s'); ?>
<?php
$date = new DateTime('2000-01-01');
echo $date->format('Y-m-d H:i:s');
?>
date("Y-m-d H:i:s")
<?php
$date = new DateTime('2000-01-01');
echo $date->format('Y-m-d H:i:s');
?>