Change Joomla’s date 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.

1. Create Language Override

dateformat_search.png

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.

2. Change Date Format

dateformat_text.png

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

3. Refresh Your Page

dateformat_newdate.png

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

Helpful Hints: Date Format Definitions

dateformat_formatguide.png

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

Gửi phản hồi

Please log in using one of these methods to post your comment:

WordPress.com Logo

Bạn đang bình luận bằng tài khoản WordPress.com Log Out / Thay đổi )

Twitter picture

Bạn đang bình luận bằng tài khoản Twitter Log Out / Thay đổi )

Facebook photo

Bạn đang bình luận bằng tài khoản Facebook Log Out / Thay đổi )

Google+ photo

Bạn đang bình luận bằng tài khoản Google+ Log Out / Thay đổi )

Connecting to %s

%d bloggers like this: