Answers for "extract date from datetime object in php"

PHP
1

php extract time from datetime

$time = '2013-01-22 10:45:45';

echo $time = date("H:i:s",strtotime($time));
Posted by: Guest on July-01-2020
0

extract date from datetime object in php

<?php
$date = new DateTime('2000-01-01');
echo $date->format('Y-m-d H:i:s');
?>
Posted by: Guest on April-29-2021

Code answers related to "extract date from datetime object in php"

Browse Popular Code Answers by Language