PHP Learning : Date Function - Publik Talk

Breaking

An informative website for every one.

Post Top Ad

Post Top Ad

Wednesday, August 2, 2017

PHP Learning : Date Function

Description:

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:

Code:

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



output:

No comments:

Post a Comment

Post Top Ad