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 | A | AM or PM in uppercase letters | h | hour in digits (01 to12) | H | hour in digits (00 to 23) | g | hour in digits without the leading zero (1 to 12) | G | hour in digits without the leading zero (0 to 23) | i | minutes in digits (00 to 59) | s | seconds in digits (00 to 59) | d | day of month in digits (01 to 31) | j | day of month in digits without the leading zero (1 to 31) | D | day of week in three letter text (Mon to Sun) | l | day of week in complete text (Monday to Sunday) syntax is a lowercase "L" | w | day of week numeric (0 to 6) (Sunday to Saturday) | F | month in complete text (January to December) | m | month in digits (01 to 12) | n | month in digits without leading zero (1 to 12) | M | month in three letter text (Jan to Dec) | Y | year in four digits (2004) | y | year in 2 digits (04) | z | day of year (0 to 365) | t | number of days in a month (28 to 31) | S | English suffix (th, nd, st) | Z | time zone offset in seconds (-43200 to 43200) | U | seconds since Epoch (Jan 1, 1970 00:00:00 GMT) |
The PHP Date Function
|
|
This site needs an editor - click to learn more!
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.