Answers for "php date format output"

PHP
3

php format datetime

//Solution 1
$from = date('Y-m-d H:i a', strtotime($date_time));
echo $from;
//Solution 2
$date=date_create($date_time);
echo date_format($date,"Y/m/d H:i:s");
Posted by: Guest on January-31-2022

Browse Popular Code Answers by Language