The default date format in Joomla is based on United Kingdom English. Not everyone wants this date format.
If you’ve ever wanted to change the date format in Joomla from day month year to US date standard of month day, year, then this is the post for you. Let’s get started.
Many want to show the date on their blog posts in Joomla. The default language in Joomla is en-GB. The default display of the date shows as day Month year. For example, 03 August 2020.
What if you want to display the date a different way? Glad you asked. In today’s blog post we’ll show you how to change the date format from 03 August 2020 to August 03, 2020 (US standard). Note you can change the date to many formats. See PHP: date for more example formats.
- Login to the backend of Joomla
- Click on Extensions -> Languages -> Overrides
- Select the Language you want to change from the Select Language & Client drop-down.
- Click the New button in the Top Toolbar.
- In the Search For field on the right-hand side of the screen, select Constant from the drop-down.
- In the Search field, enter the language string DATE_FORMAT_LC3. Then press Enter or click Search.
- Under the Search Results section of the page, you’ll see the DATE_FORMAT_LC3 result pop up.
- Click on the entry for DATE_FORMAT_LC3 under Search Results. This will populate the left-hand side of the screen with details for that language string.
- d F Y stands for day Month Year. You want to swap that around to F d, Y. We’ve added a comma after the day so that it will display as August 03, 2020. Click Save & Close from the Top Toolbar.
There are several options for date formats that you can utilise. Check out PHP: date to find more date formats.
- Refresh the frontend of your site. You’ll see that the date format has changed to the US standard.
Congratulations, you've done it!
For more great Joomla tips and best practices, see all our fabulous Joomla courses. See you there!