get date from date object php code example
Example 1: extract date from DateTime object php
<?php
$date = new DateTime('2000-01-01');
echo $date->format('Y-m-d H:i:s');
?>
Example 2: php get date
date("Y-m-d h:i:sa")
<?php
$date = new DateTime('2000-01-01');
echo $date->format('Y-m-d H:i:s');
?>
date("Y-m-d h:i:sa")