Answers for "how to show the time and date in php"

PHP
1

Get the Current Date and Time in PHP

phpCopy<?php
$Object = new DateTime();  
$DateAndTime = $Object->format("d-m-Y h:i:s a");  
echo "The current date and time are $DateAndTime.";
?>
Posted by: Guest on April-23-2021

Code answers related to "how to show the time and date in php"

Browse Popular Code Answers by Language