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 :
[ 0 ] Comments