The PHP Date Function Format Chart

The PHP Date Function Format Chart
The PHP date() function is one of the most useful built-in functions. Below is the syntax and description for the various format controls.

The PHP Date() Function Format Chart
a am or pm in lowercase letters
AAM or PM in uppercase letters
hhour in digits (01 to12)
Hhour in digits (00 to 23)
ghour in digits without the leading zero (1 to 12)
G hour in digits without the leading zero (0 to 23)
iminutes in digits (00 to 59)
s seconds in digits (00 to 59)
dday of month in digits (01 to 31)
jday of month in digits without the leading zero (1 to 31)
Dday of week in three letter text (Mon to Sun)
lday of week in complete text (Monday to Sunday)
syntax is a lowercase "L"
wday of week numeric (0 to 6) (Sunday to Saturday)
Fmonth in complete text (January to December)
mmonth in digits (01 to 12)
nmonth in digits without leading zero (1 to 12)
Mmonth in three letter text (Jan to Dec)
Yyear in four digits (2004)
yyear in 2 digits (04)
zday of year (0 to 365)
tnumber of days in a month (28 to 31)
SEnglish suffix (th, nd, st)
Ztime zone offset in seconds (-43200 to 43200)
Useconds since Epoch (Jan 1, 1970 00:00:00 GMT)

The PHP Date Function






This site needs an editor - click to learn more!



RSS
Editor's Picks Articles
Top Ten Articles
Previous Features
Site Map





Content copyright © 2023 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact BellaOnline Administration for details.