I wish to change the date from the default "US Format MM/DD/YYYY" to the "UK Format DD/MM/YYYY".
Is there an easy solution?
BR
Toby
I wish to change the date from the default "US Format MM/DD/YYYY" to the "UK Format DD/MM/YYYY".
Is there an easy solution?
BR
Toby
in your override copy of english.php, modify this section:
Code:@setlocale(LC_TIME, 'en_US.ISO_8859-1'); define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'm/d/Y'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');
Neville
An assumption is what you arrive at when you get tired of thinking...
www.customcartmods.com
Hi
I made the following changes to my english.php:
@setlocale(LC_TIME, 'en_US.ISO_8859-1');
define('DATE_FORMAT_SHORT', '%d/%m/%Y'); // this is used for strftime()
define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime()
define('DATE_FORMAT', 'd/m/Y'); // this is used for date()
define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S');
Is this everything?
When I go to the create account page on my site - it still says for "Date of Birth" the system requires the MM/DD/YYYY Format..
I hope you can help?
Kind Regards
Toby
same file:
Code:// text for date of birth example define('DOB_FORMAT_STRING', 'mm/dd/yyyy');
Neville
An assumption is what you arrive at when you get tired of thinking...
www.customcartmods.com
Im having the same trouble...maybe u can help?
My examples show that it should be: 21/05/1970, but when user inputs that it comes up Is your birth date correct? Our system requires the date in this format: DD/MM/YYYY (eg 21/05/1970)
I have done this in the php as u indicated but it still only works when usa format is inputed.
Could this be from me having overrides done wrong?
I have the english php in the languages folder and the same changes on another copy of the english php in my languages/custom.
Thanks for lookin!
I am having the same problem. I have changed all the code about and also the error messages but it still says UK is wrong when i try to enter it. Can any one give me any advise ?
This is incomplete. The full solution is here:
http://www.zen-cart.com/forum/showth...ht=Date+format
Fantastic thread works like a treat.
It would be great in the next release that this could be made in the admin section for the site.
Cheers
Brett
Thank you so much for this tutorial![]()
Right... feeling pretty stupid right about now, but have figured it out nonetheless...
Thanks Phill, you are as good as they say ;)![]()
Bookmarks