date
(PHP 3, PHP 4 )
date -- Format a local time/date
Description
string date ( string format [, int timestamp])
Returns a string formatted according to the given format
string using the given integer timestamp or the current
local time if no timestamp is given. In otherwords, timestamp
is optional and defaults to the value of time().
Note: The valid range of a timestamp is typically from
Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07
GMT. (These are the dates that correspond to the minimum
and maximum values for a 32-bit signed integer). On Windows
this range is limited from 01-01-1970 to 19-01-2038.
Note: To generate a timestamp from a string representation
of the date, you may be able to use strtotime(). Additionally,
some databases have functions to convert their date formats
into timestamps (such as MySQL's UNIX_TIMESTAMP function).
|