{"id":10851332,"date":"2018-11-06T03:52:35","date_gmt":"2018-11-06T03:52:35","guid":{"rendered":"https:\/\/wordpress.org\/support\/?post_type=helphub_article&p=10851332"},"modified":"2023-01-12T21:25:15","modified_gmt":"2023-01-12T21:25:15","slug":"customize-date-and-time-format","status":"publish","type":"helphub_article","link":"https:\/\/wordpress.org\/documentation\/article\/customize-date-and-time-format\/","title":{"rendered":"Customize date and time format"},"content":{"rendered":"\n
Certain WordPress tag functions are used to display or return date and time information; the_date()<\/a> and the_time()<\/a> are examples of this.<\/p>\n\n\n\n By default, these functions will display or return date and time in format as it is set in Administration<\/a> > Settings<\/a> > General<\/a>. This is the place where customizing format for Date and Time will take effect throughout the whole WordPress installation.<\/p>\n\n\n\n Notice the string of characters next to each Date and Time formatting in screenshot. This string is called a format string<\/strong>. Each letter represents specific part of Date or Time.<\/p>\n\n\n\n For example, the format string:<\/p>\n\n\n\n creates a date that look like this (note that commas are read literally):<\/p>\n\n\n\n Here is what each format character in the string above represents:<\/p>\n\n\n\n Format characters are standardized and globally used in PHP<\/a> programming language. As WordPress is written in PHP programming language you can use the table of Date and Time format characters directly from the PHP website<\/a>.<\/p>\n\n\n\n Here is a table of some of the more useful items found there:<\/p>\n\n\n\nl, F j, Y<\/pre>\n\n\n\n
Friday, September 24, 2004<\/pre>\n\n\n\n
l<\/code> = Full name for day of the week (lower-case L).<\/li>
F<\/code> = Full name for the month.<\/li>
j<\/code> = The day of the month.<\/li>
Y<\/code> = The year in 4 digits. (lower-case y gives the year’s last 2 digits)<\/li><\/ul>\n\n\n\n