Answers for "how to use date and now() in php code"

PHP
14

date now php

date('Y-m-d H:i:s')
Posted by: Guest on July-11-2020
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

Browse Popular Code Answers by Language