Answers for "php date format strtotime"

PHP
3

php strtotime

echo strtotime("now"); //1624416532
echo date("d M. Y", strtotime("now")); // 23 Jun. 2021

$time_c = strtotime("2021-06-07 05:57:51");
echo date("d M. Y", $time_c); // 07 Jun. 2021
echo date("H:i", $time_c); // 05:57
Posted by: Guest on June-23-2021
0

php date strtotime format

$date = '25/05/2010';
$date = str_replace('/', '-', $date);
echo date('Y-m-d', strtotime($date));
Posted by: Guest on December-03-2020

Browse Popular Code Answers by Language