Posted By:
16 Mar, 2014 3:09 am PDT

date function in PHP

How to display date in PHP?

We have built –in date() function in PHP which has two parameters format and timestamp.


date(format , timestamp);

»Format  parameter specifies format of the date/time and timestamp parameter is optional.Default time stamp is current time and date.


//Program to show how to use date() function





echo date("Y/m/d")."<br>";

echo date("Y.m.d");





/*Output of the above program is:





date function in PHP .This shows how user can use date function in Php and display date.

Attachment: date.php
Was it useful?  

Please login to reply to this problem.