How to change date format

How to change date format

DJ-Classifieds uses the PHP date format.

You can change the settings of the date format in options.

The default date format is: 

Y-m-d H:i:s

(on the screenshot below, you can see how it looks like by default) - it means that the date displays in 24h format with the order :

Year-month-day Hours:minutes:seconds

You can find out the syntax of the date format here:

For example, let's change the date format to look like:

month-day-year hours:minutes:seconds

and to be in 12h format

Checking the above PHP manual, the syntax for this should be:

m-d-Y h:i:s a

(a indicates that we want to display am/pm parameter).

Open your DJ-Classifieds control panel. Navigate to "Options" and scroll down to the "Date Settings" section.

Apply this syntax in DJ-Classifieds component's options, and the date format change is ready.
  1. The default format (Y-m-d H:i:s):

And that is how the selected date format looks on the front page:
  1. Our example with the changed format (m-d-Y h:i:s a):

Check the effect on the front page:

      • Related Articles

      • How to change date format in DJ-Classifieds custom fields

        You can change the date format in extra fields in DJ-Classifieds. Let’s add the custom field with a date. For the sake of this tutorial, I’ll create the “Availability” custom field that will be used for showing the availability for the apartments. ...
      • Show ad's modification date in advert details

        You can display the date of a modification of an ad. It can be displayed in two places, below the date of publishing an ad. To display the date of modification go to Options>’ Advert details’ section of ’Views’ tab and in parameter ‘show modified ...
      • How to use DJ-Classifieds-Importer

        Important Note: We distribute the DJ-Classifieds-Importer component along with the active subscription of DJ-Classifieds. That means that if your subscription for DJ-Classifieds is active, you can download and use the DJ-Classifieds-Importer ...
      • Auctions in DJ-Classifieds

        DJ-Classifieds component allows hosting auctions on your Joomla powered website! Users can run their own auctions and sell items to your site visitors! To make it everything more comfortable, we will show you how to manage the auctions, place a bid ...
      • How to order "fields" in DJ-Classifieds

        If you are wondering how to order "fields" in DJ-Classifieds component, follow this simple tutorial to learn everything! It's easy to make! Open the DJ-Classifieds component. Navigate to the "Fields" button and open it. Now navigate to the right, ...