• Home
  • Learn Joomla
    • Roadmap for New Users
    • Joomla Lingo
    • Joomla Installation
    • Joomla Administration
    • Joomla Documentation
    • Tutorials
  • How-to Videos
    • Index to Videos
    • Site Basics Videos
    • FAQ Videos
  • How Do I?
  • Site Showcase
  • Blog
  • Contact

How to change the Joomla date format

PDF | Print | E-mail

 

When Joomla is installed, it shows dates in a European format, and it includes the minute and time that an article is created.

For example, look at the date in the screen shot below:

faq-time-date-315

Depending on where in the world you are, you may want the dates to be in a different format.  Joomla can format them any way you want, but the date format is a bit hard to find in the "language file."

And, you cannot easily get to it from within Joomla itself, so that makes it a bit more difficult.

Here's how to change it.  Let's change the date to an American format, and let's drop the reference to the minute and second when the article is created.

Our goal is for the article date to look like this:  December 25, 2011

Since we cannot get to the "language" files from within a default Joomla installation, let's use an FTP program to access the files.

Note:  if you are working on your Joomla website on your own computer using a "localhost" approach, this is much easier.  You don't need to use an FTP program.  Just navigate to the proper folder in your computer's file system.

 

Start your FTP program and log into your website.  If you don't have an FTP program, I recommend FileZilla as a very good, free program.

 

Navigate to the following folder:

/language/en-GB

 

Now, look for the file titled en-GB.ini.   It is a plain text file, so you can edit that with a text editor.


Thsi will load the language file in your editor.  Joomla uses this file to keep the words and phrases that it uses, but it also keeps the date codes in there, too.

 

Scroll down until you see these lines:

fag-dateformat-1

 

You want to change this line a bit.   The %H:%M at the end refers to "show the hour and the minute."  We don't really need that on our site, so delete those codes.

So, now we have this:

DATE_FORMAT_LC2=%A, %d %B %Y

Next we will change the date format to the American format of "December 25, 2011"

So, let's switch the %d (which displays the date number) and the %B (which shows the month as a word.   And, let's add a comma (,) between the day and the year.

So, we now have

DATE_FORMAT_LC2=%A, %B %d, %Y

Save your changes (and be sure that they upload back to your webserver).

Check your site now (be sure to refresh the page to reload the latest changed.

You will see that the date format has changed to an American format.

faq-dateformat-done

 

To see a list of all of the date format options in php, go to this link: http://us2.php.net/strftime/.

 

 

 
New? Start Here ...
  • Roadmap for New Users
  • Joomla Basics
  • How Do I Do This?
  • Free Templates
  • Joomla Tutorial Sites
  • Find the Joomla Documentation
  • Templates & Design Issues
  • FAQ Videos
  • Joomla Books
Quick Access
  • What's New / What's Hot
  • Recent Good Stuff
  • John's Joomla Toolbox
  • Template Sources
  • Recommended Joomla Tutorials
  • John's Real Job
  • Site Feedback / Contact
  • Site Credits
Recent "Good Stuff"
  • How to use the expanded user profiles in Joomla 1.7
  • A new template from JoomlaShine and an update to their slide show
  • 2 simple plug-ins for administrator approval of new users
  • A new version of the free template JA Purity - Wow!
  • A very nice, "lite" administrative template
  • A very easy way to keep your Joomla install up to date
  • Add new power to your administrative control panel
  • A couple of great modules for your site
  • A Great Free Template from JoomlaShack: Optimus
Featured Articles
  • Joomla Lingo
  • Why Should I Use Joomla?
  • How do I change the footer text in a template?
  • What is the difference between a component, a module and a mambot / plugin ?
Joomla 1.5 Featured Articles
Top "How Do I?" Articles
  • How do I create a quick "logout" button for users?
  • How do I "move" a Joomla website from one folder to another?
  • How to change the Joomla date format
  • Where does Joomla keep the articles?
  • Changing the text of messages in Joomla
  • How do I put a picture in an article?
  • Making GIMP look like Photoshop
  • How to I create a custom page for a user to see after they submit a "contact us" message
  • Module Installation for Dummies
  • Set up a demo site that allows many people to use the same login
home | site map | contact

Welcome to Joomla is an interesting side project by John Muehleisen.  Who is this guy, anyway?

The Joomla!® name is used under a limited license from Open Source Matters in the United States and other countries.
WelcomeToJoomla.com is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.