PHP Learning : Date Function - Publik Talk


An informative website for every one.

Post Top Ad

Post Top Ad

Wednesday, August 2, 2017

PHP Learning : Date Function


The required format parameter of the date() function specifies how to format the date (or time).
Here are some characters that are commonly used for dates:

d - Represents the day of the month (01 to 31)
m - Represents a month (01 to 12)
Y - Represents a year (in four digits)
The example below formats today's date in three different ways:


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


No comments:

Post a Comment

Post Top Ad