Change Joomla's Date and Time Format

Change Joomla's Date and Time Format

Joomla comes with a standard format for showing dates.

However, there may be a site you have created that will need to use a custom date format.

In this tutorial, I will show you a step by step method on changing your date format for articles.

This method will use no coding and will also introduce you to the Language Manager, one of Joomla's best and most underappreciated features.

Step #1. Create Language Override


The first thing you'd need to do is create a Language Override. You can find our tutorial on creating language overrides here.

  1. Go to Extensions -> Language Manager.
  2. Click on Overrides tab.
  3. Click on New.
  4. Check the "Constant" value.
  5. Search for "DATE_FORMAT_LC2".
  6. Click on the Constant located under the Search Results.

Step #2. Change Date Format


Change the text for your date format to what you'd like.

Just remove the text and type in the format you'd like.

For example, if you want the date to display January 01, 2013, you would use : F j, Y

Step #3. Refresh Your Page


Congratulations! You now have a newly formatted date on your site.

Helpful Hints: Date Format Definitions


In the picture above shows different ways of displaying the date using the date formats.

Here is a list of common date format lettering which is used in Joomla:

  • l (lowercase 'L')     A full textual representation of the day of the week
  • d     Day of the month, 2 digits with leading zeros
  • M     A short textual representation of a month, three letters
  • m     Numeric representation of a month, with leading zeros
  • F     A full textual representation of a month, such as January or March
  • Y     A full numeric representation of a year, 4 digits
  • H     24-hour format of an hour with leading zeros
  • i     Minutes with leading zeros

You can view the complete list of PHP date formats found here.

What's Next?

Save $1000's when you sign up to Joomlashack's Everything Club.

You will get access to all our 31 extensions, templates, and Joomla training.

  Click here to join the Everything Club