How to change the date format in PrestaShop

This article will explain how to change the date format in PrestaShop 1.4 and 1.5. From the back office of PrestaShop click on Tools, then Languages. Select your language eg. English.

You will see two date format input fields as shown in the diagram below. PrestaShop by default uses the American date format, however in the UK and Australia the date format is day/month/year.   To change the date format to day/month/year. Change the date format to d/m/Y as show in the below diagram.

 

change date format prestashop

 

Some more examples:

Format: 'Y-m-d H:i:s'
will output: 2012-03-24 17:45:12

Format: ‘d/m/Y H:i:s’
will output: 24/03/2012 17:45:12

Format: 'd/m/Y H:i'
will output: 24/03/2012 17:45

Format: 'd/m/y'
will output: 24/03/12

Format: 'm.d.y'
will output: 03.10.12

For more advanced examples see: http://php.net/manual/en/function.date.php

 

For users on earlier releases of PrestaShop eg. 1.3 you will need to make programming changes to the Tools.php.

You can find code examples here:

http://dapurpixel.com/blog/how-to/change-date-format-in-prestashop

http://apurbapathak.blogspot.com.au/2011/01/change-date-format-in-prestashop.html

 

Tags: , , , , ,

 

PrestaShop Developer

I am an experienced PrestaShop Developer and available for PrestaShop development work. I have been developing PrestaShop websites and specialising in e-commerce web development for over 4 years. I follow PrestaShop 1.5 best practices guidelines. I can help you with PrestaShop installation, configuration, module development and custom template changes. Please contact me for your next PrestaShop project.
 

prestashop modules

 
h divider