Answers for "date month format php"

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
0

format date in php

$myDateTime = DateTime::createFromFormat('Y-m-d', $dateString);
$newDateString = $myDateTime->format('d-m-Y');
Posted by: Guest on March-25-2021

Browse Popular Code Answers by Language