英[deɪt] 美[det]

n.Date; date, day; era, year; (of date palm trees common in North Africa and West Asia) date palm

vt. Outdated; to make... appear older; to show the era (or age) of...; to identify the age of... Calculate the date from a certain time; record the date; note (or indicate) the date

Third person singular: dates Plural: dates Present participle: dating Past tense: dated Past participle: dated

php date() function syntax

Function:Format the timestamp into a more readable date and time.

Syntax:date(format,timestamp)

Parameters:

Parameters Description
format Required. Specifies the format of the timestamp.
timestamp Optional. Specify timestamp. The default is the current time and date.

Note: The format parameters of thedate() function are required, and they specify how to format the date or time.

php date() function example


Run instance»

Click the "Run instance" button to view the online instance

Output:

2012-04-25



Run Instance»

Click the "Run Instance" button to view the online instance

Output:

2012-04-24 16:00:00