You are here:
» PHP Date Function
PHP date function
This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.
The PHP date() function formats a timestamp to a more readable date and time. But, what is a timestamp?

1 year 43 weeks ago
Tags:
A timestamp is the number of seconds from January 1, 1970 at 00:00. Otherwise known as the Unix Timestamp, this measurement is a widely used standard that PHP has chosen to utilize.
The required format parameter in the date() function specifies how to format the date/time.
* d - Represents the day of the month (01 to 31)
* m - Represents a month (01 to 12)
* Y - Represents a year (in four digits)
<?php
echo date("Y/m/d") . "<br />";
echo date("Y.m.d") . "<br />";
echo date("Y-m-d")
?>
Post Comment