Answers for "datetime example php"

PHP
2

Datetime to string php

<?php
$date = new DateTime('2000-01-01');
echo $date->format('Y-m-d H:i:s');
?>
Posted by: Guest on March-30-2020
3

datetime php

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

datetime php

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

Browse Popular Code Answers by Language