Login

New to DJ-Extensions?

How to change date format

DJ-Classifieds uses the PHP date format.
The default date format is: 
Y-m-d H:i:s

It means that the date displays in 24h format with the order:
Year-month-day Hours:minutes:seconds

To change date format:

  1. Open DJ-Classifieds settings.
  2. Go to "Dates" tab.
  3. Change date format

You can find out the syntax of the date format here: http://php.net/manual/function.date.php

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, small h indicates that we want to display 12-hour format of an hour with leading zeros).

Open your DJ-Classifieds control panel. Navigate to "Options" and open "Dates" tab.

Apply this syntax in DJ-Classifieds component's options, and the date format change is ready.

And that is how the selected date format looks on the front page:

© 2023 DJ-Extensions.com. All rights reserved.