PHP
How to show the current date and time in PHP?
![](https://blog.codehunger.in/wp-content/uploads/2022/08/how-to-show-the-current-date-and-time-in-php_255.jpg)
Php has a pre-defined function for date and time that is “date”,
<?php $currentDateTime = date('Y-m-d H:i:s'); echo "Your current Date and time is:" . $currentDateTime; ?>
the output is: Your current Date and time is:2020-01-26 12:11:05