Answers for "strtotime to date in php"

PHP
0

string to datetime php

$s = '06/10/2011 19:00:02';
$date = strtotime($s);
echo date('d/M/Y H:i:s', $date);
Posted by: Guest on May-25-2020
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