Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
PHP
<?php $date = new DateTime('2000-01-01'); echo $date->format('Y-m-d H:i:s'); ?>
Daniel Lawson
Programming language:
PHP
2021-05-16 21:34:05
0
Q:
<?php $date = new DateTime('2000-01-01'); echo $date->format('Y-m-d H:i:s'); ?>
Samuel U-First
Code:
PHP
2021-02-10 19:33:17
<?php
$date
=
new
DateTime(
'2000-01-01'
);
echo
$date
->format(
'Y-m-d H:i:s'
);
?>
1
Tags
php
new
time
date
form
Related
date now php
date php
datetime php
php code to display current date and time in different formats
php format date
only date in php
date in php
php all date formats
php datetime format
php date strtotime format
php date_format
date time format php
php datetime
change datetime format from Y-m-d h:i:s to d-m-Y in php
php get current datetime mysql format
php date
phph date
New to Communities?
Join the community