Page 1 of 7 123 ... LastLast
Results 1 to 10 of 63
  1. #1
    Join Date
    Feb 2007
    Posts
    20
    Plugin Contributions
    0

    Default How do I change the Date format?

    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

  2. #2
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,946
    Plugin Contributions
    5

    Default Re: How do I change the Date?

    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...

  3. #3
    Join Date
    Feb 2007
    Posts
    20
    Plugin Contributions
    0

    Default Re: How do I change the Date?

    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

  4. #4
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,946
    Plugin Contributions
    5

    Default Re: How do I change the Date?

    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...

  5. #5
    Join Date
    Jan 2007
    Location
    Mount Maunganui, New Zealand
    Posts
    394
    Plugin Contributions
    0

    Default Re: How do I change the Date?

    Quote Originally Posted by bunyip View Post
    same file:
    Code:
    // text for date of birth example
      define('DOB_FORMAT_STRING', 'mm/dd/yyyy');
    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!

  6. #6
    Join Date
    May 2007
    Posts
    38
    Plugin Contributions
    0

    Default Re: How do I change the Date?

    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 ?

  7. #7
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,850
    Plugin Contributions
    5

    Default Re: How do I change the Date?

    Quote Originally Posted by Crazy View Post
    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 ?
    Remember to alter the english.php in the admin & the catalog sections.
    You may have edited the wromg one. You need to edit BOTH

  8. #8
    Join Date
    May 2007
    Posts
    38
    Plugin Contributions
    0

    Default Re: How do I change the Date?

    No i tried its please try and sign up ? i editted so that the error messages and the examples are correct but it won't accepted dd/mm/yyyy

    http://crazy-hosting.co.uk/########/inde...create_account

  9. #9
    Join Date
    Jul 2007
    Posts
    161
    Plugin Contributions
    0

    Default Re: How do I change the Date?

    I'm having a little trouble changing the date format to dd/mm/yyyy. I managed to get it all changed and it works but in the create account and my account information the example still says 05/21/1970. But it is working in the correct format if you enter it was 05/21/1970 it returns an error saying it should be in the format 05/21/1970.

    can anyone help me change the example text please?

  10. #10
    Join Date
    Aug 2005
    Location
    Vic, Oz
    Posts
    1,850
    Plugin Contributions
    5

    Default Re: How do I change the Date?

    Quote Originally Posted by Phil020782 View Post
    I'm having a little trouble changing the date format to dd/mm/yyyy. I managed to get it all changed and it works but in the create account and my account information the example still says 05/21/1970. But it is working in the correct format if you enter it was 05/21/1970 it returns an error saying it should be in the format 05/21/1970.

    can anyone help me change the example text please?
    You need to edit admin\includes\languages\english.php

    and

    includes\languages\english.php
    (edit and copy this one into your override directory)
    includes\languages\YOUR_TEMPLATE\english.php

 

 
Page 1 of 7 123 ... LastLast

Similar Threads

  1. How do I change date format?
    By craftyrose in forum Basic Configuration
    Replies: 3
    Last Post: 21 Aug 2010, 03:52 AM
  2. change date format how??
    By kitcorsa in forum General Questions
    Replies: 3
    Last Post: 30 Oct 2008, 02:54 PM
  3. Replies: 0
    Last Post: 14 Apr 2008, 08:54 PM
  4. How to change date format
    By dail in forum Customization from the Admin
    Replies: 0
    Last Post: 13 Jun 2007, 08:35 AM
  5. How change date format to spanish?
    By Stack A Brown in forum General Questions
    Replies: 1
    Last Post: 17 Apr 2007, 09:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR