Answers for "datetime from format 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

php datetime create

$date = DateTime::createFromFormat('d-m-Y', '15-12-2020');
Posted by: Guest on February-17-2020
3

datetime php

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

Browse Popular Code Answers by Language