PHP date format

PHP date format


Posted in : PHP Posted on : January 25, 2011 at 6:28 PM Comments : [ 0 ]

In this tutorial you will learn different PHP date format in a PHP web application .

PHP date format

In this tutorial you will learn different PHP date format in a PHP web application . In PHP date() function that use for date and it also support different date format . The date('Y-m-d')  that display date format year , month and  day  respectively as (2011-01-25) . The code of "php-date-format.php" given below :

<?php
echo "PHP Date Format<br/>";
echo date("Y-m-d")."<br/>";
echo date("jS F, Y")."<br/>";
echo date("Y.m.d") ."<br/>";
echo date("Y/m/d")."<br/>";
echo date("Y/m/d H:i:s")."<br/>";
echo date('F d Y H:i:s')."<br/>";
?>

Output :

When run "php-date-format.php" display output as :

Download Source Code

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics