Friday, 13 April 2018

How to Print Date and Time in PhP?


Program:-

<?php
//    Day/month/year
$date = date(‘d/m/y’);
echo  $date.'<br>’;
     //  Hours/Mintus/Seconds
$time = date(‘H:m:s’);
echo  $time;
?>

OUTPUT:-
7/08/2017
03:52:51

1 comment:

Popular Posts

Categories

Android (21) AngularJS (1) Books (3) C (75) C++ (81) Data Strucures (4) Engineering (13) FPL (17) HTML&CSS (38) IS (25) Java (85) PHP (20) Python (83) R (68) Selenium Webdriver (2) Software (13) SQL (27)