PHP Date and Time Formats

a‘am’ or ‘pm’ (lowercase)pm
A‘AM’ or ‘PM’ (uppercase)PM
dDay of month, a number with leading zeroes20
DDay of week (three letters)Thu
FMonth nameJanuary
hHour (12-hour format – leading zeroes)12
HHour (24-hour format – leading zeroes)22
gHour (12-hour format – no leading zeroes)12
GHour (24-hour format – no leading zeroes)22
iMinutes ( 0 – 59 )23
jDay of the month (no leading zeroes20
l (Lowercase ‘L’)Day of the weekThursday
LLeap year (‘1’ for yes, ‘0’ for no)1
mMonth of year (number – leading zeroes)1
MMonth of year (three letters)Jan
rThe RFC 2822 formatted dateThu, 21 Dec 2000 16:01:07 +0200
nMonth of year (number – no leading zeroes)2
sSeconds of hour20
UTime stamp948372444
yYear (two digits)06
YYear (four digits)2006
zDay of year (0 – 365)206
ZOffset in seconds from GMT+5
[instagram-feed feed=1]
© 2024 BenaDigital Limited | All Rights Reserved
magnifiercrosschevron-down