Answers for "php datetime string"

PHP
2

pasar datetime a string php

$theDate    = new DateTime('2020-03-08');
echo $stringDate = $theDate->format('Y-m-d H:i:s');

//output: 2020-03-08 00:00:00
Posted by: Guest on March-27-2021
3

datetime php

$dateTime = new \DateTime();
$dateTime->format('Y-m-d H:i:s');
Posted by: Guest on June-15-2020
0

php strftime datetime

setlocale(LC_TIME, 'it_IT.UTF-8');
$date = new DateTime($run['at']);
strftime("%d %B", $date->getTimestamp())
Posted by: Guest on May-20-2020
0

pasar datetime a string php

$date = date_create_from_format('d M, Y', '08 Mar, 2020');
echo $newFormat = date_format($date,"Y/m/d H:i:s");

//output: 2020/03/08 00:00:00
Posted by: Guest on March-27-2021
0

pasar datetime a string php

$date = explode("/",date('d/m/Y/h/i/s')
list($day,$month,$year,$hour,$min,$sec) = $date);
echo $month.'/'.$day.'/'.$year.' '.$hour.':'.$min.':'.$sec;

//output: 03/08/2020 02:01:06
Posted by: Guest on March-27-2021

Browse Popular Code Answers by Language