Forums / General Questions / How do I change the Date format?

How do I change the Date format?

Locked

Views: 108,760

Results 21 to 40 of 69
This thread is locked. New replies are disabled.
11 Mar 2008, 3:36 PM
#21
fergusmacdonald avatar

fergusmacdonald

Zen Follower

Join Date:
Oct 2007
Location:
Edinburgh, Scotland
Posts:
243
Plugin Contributions:
0

How do I change the Date format?

JillC:

This was great info, thanks. However, I have been wading through tutorials and little warnings pop up now and again about making sure your files don't get over-ridden during an update. For this reason (AT STEP 6) I copied the file admin/includes/languages/<YOUR_LANGUAGE>.php into
admin/includes/languages/<YOUR_TEMPLATE>/<YOUR_LANGUAGE>.php and made my changes there.

It seems to work and I don't know if I'm just being over cautious or not.
:smile:

Template override system is not currently available for the Admin section so you need to make changes to the /admin/includes/languages/<YOUR-LANGUAGE>.php file. If you copy this file into /admin/includes/languages/<YOUR-TEMPLATE>/<YOUR-LANGUAGE>.php it will have no effect on your store.

15 Apr 2008, 12:18 PM
#22
rainbows avatar

rainbows

New Zenner

Join Date:
Nov 2005
Location:
Australia
Posts:
26
Plugin Contributions:
0

Re: How do I change the Date format?

I also wanted to say thankyou to the wonderful people in here to take their time to help others.

I have managed to change most of my dates over too (Im in Australia & therefore wanted the 'UK' format).

They are all working wonderful. The only ones I have found that have not changed are the dates that Coupons expire. My customers get a message that this coupon expirse on ... and the date is US format.

Any help is appreciated.

Thanks

Goodnite Lingerie & Adult Toys
https://www.goodnite.com.au

18 Apr 2008, 1:19 PM
#23
cmyk avatar

cmyk

New Zenner

Join Date:
Dec 2007
Location:
Sydney Australia
Posts:
21
Plugin Contributions:
0

Re: How do I change the Date format?

Phil your a bloody legend :smartalec:

thanks Mate :hug:

18 Apr 2008, 2:24 PM
#24
oavs avatar

oavs

Totally Zenned

Join Date:
Jan 2006
Location:
Downunder - QLD - Gold Coast
Posts:
921
Plugin Contributions:
0

Re: How do I change the Date format?

rainbows:

I also wanted to say thankyou to the wonderful people in here to take their time to help others.

I have managed to change most of my dates over too (Im in Australia & therefore wanted the 'UK' format).

They are all working wonderful. The only ones I have found that have not changed are the dates that Coupons expire. My customers get a message that this coupon expirse on ... and the date is US format.

Any help is appreciated.

Thanks

That's because there are hundreds of other files still with Y-m-d format. I would leave it alone as it might have some thing to do with Mysql dates or external things like currency etc might get affected.

The only sure way of doing is to replace them in the files you see its not correct.

Downunder QLD

20 Apr 2008, 4:45 AM
#25
vivaraquel avatar

vivaraquel

Zen Follower

Join Date:
Sep 2004
Location:
Australia
Posts:
305
Plugin Contributions:
0

Re: How do I change the Date format?

I am really sorry but it isn't working for me. I have redone it a few times and I don't have a CUSTOM file inmy admin section so I don't know why it is.

And I am working on my site offline so I can't link to it.

20 Apr 2008, 5:19 AM
#26
vivaraquel avatar

vivaraquel

Zen Follower

Join Date:
Sep 2004
Location:
Australia
Posts:
305
Plugin Contributions:
0

Re: How do I change the Date format?

NVM, I redid it all again and it worked. Than you so much.

23 Apr 2008, 12:56 AM
#27
ollieoll2k8 avatar

ollieoll2k8

New Zenner

Join Date:
Apr 2008
Location:
Stockton. UK
Posts:
15
Plugin Contributions:
0

Re: How do I change the Date format?

Excellent info Phil, Thanks, much appreciated. :cool::clap:

PS. Message To all zenners... I bought the Zen Book and it has saved me HOURS of frustration. Brilliant publication. Every novice should own it!!!!

If at first you don't succeed....GET ZENNED!!!!!

10 May 2008, 11:01 AM
#29
brettw avatar

brettw

New Zenner

Join Date:
Mar 2008
Posts:
64
Plugin Contributions:
0

Re: How do I change the 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

22 May 2008, 7:11 AM
#30
laydiefa avatar

laydiefa

New Zenner

Join Date:
May 2008
Posts:
13
Plugin Contributions:
0

Re: How do I change the Date format?

Thank you so much for this tutorial :flex:

27 May 2008, 1:03 AM
#31
cold_turkey avatar

cold_turkey

New Zenner

Join Date:
Apr 2008
Posts:
5
Plugin Contributions:
0

Re: How do I change the Date format?

:clap: Thanks everyone. Special thanks to Phil. I hope it's an easier process in the next update.

28 May 2008, 5:56 PM
#32
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Location:
South Australia
Posts:
86
Plugin Contributions:
1

Re: How do I change the Date format?

it took me a bit to work out i was missing the following defines:

admin english.php

define('DOB_FORMAT_STRING', 'dd/mm/yyyy');

define('JS_DOB', '* The \'Date of Birth\' entry must be in the format: xx/xx/xxxx (date/month/year).\n');

define('ENTRY_DATE_OF_BIRTH_ERROR', ' <span class="errorText">(eg. 21/05/1970)</span>');

and your template english.php

  define('DOB_FORMAT_STRING', 'dd/mm/yy');

  define('ENTRY_DATE_OF_BIRTH_ERROR', 'Is your birth date correct? Our system requires the date in this format: DD/MM/YYYY (eg 21/05/1970)');

  define('ENTRY_DATE_OF_BIRTH_TEXT', '* (eg. 21/05/1970)');

its suprising how handy the "developers tool kit" can be amd finding 'the' file with 'that' text.:clap:

15 Jun 2008, 1:02 PM
#33
dodger5 avatar

dodger5

New Zenner

Join Date:
Jun 2008
Posts:
1
Plugin Contributions:
0

Re: How do I change the Date format?

Hi,
I'm using Easy Populate to upload products and the date product added is not going through properly - it is using reading my UK date data as US format, so is not adding products to the newly added section.

Any ideas on how to fix this? I have changed all the references to the format in english.php for both my template and admin sections?

thanks

29 Jul 2008, 4:10 AM
#34
alexamyst avatar

alexamyst

New Zenner

Join Date:
Jul 2008
Posts:
2
Plugin Contributions:
0

Re: How do I change the Date format?

wonderfully and very clearly written, thank you :) made it very easy to change to Australia (dd/mm/yyyy) format..

2 Oct 2008, 6:59 AM
#35
truliebliss avatar

truliebliss

New Zenner

Join Date:
Sep 2008
Posts:
41
Plugin Contributions:
1

Re: How do I change the Date format?

Hi, it has worked for me to the only thing is I seem to of messed my register page up as you can see from the pic below the words have gone for the date of birth and, im not sure but i think ive messed my tables up as they are no longer alined.

Hope you guys can help me with this.
Thanx

2 Oct 2008, 10:28 AM
#36
starbuck avatar

starbuck

New Zenner

Join Date:
Jun 2008
Posts:
47
Plugin Contributions:
0

Re: How do I change the Date format?

I want to set the UK date on my site but when following this on my test Site it worked for the signup form and such. But when running a sales report i get an error one of the dates you entered is not valid.

i did try changing the date format in the stats_sales_report.php file but that didn’t make any difference.
I’m thinking its the SQL database that my be the root of this but don’t know :unsure:.
Anyone else seen this and fixed it?

23 Oct 2008, 2:10 PM
#37
get_bucked avatar

get_bucked

New Zenner

Join Date:
Oct 2008
Location:
Sydney, Oz-land
Posts:
45
Plugin Contributions:
0

Re: How do I change the Date format?

Gawd... why did I bother? LOL
can't get into admin now, have checked and re-checked...

I get this message: Parse error: syntax error, unexpected T_STRING in /home/getbuck/public_html/admin/includes/languages/english.php on line 186

which should refer to one of these first lines here (assuming phil's line numbers are correct!)

define('PLEASE_SELECT', 'Please select ...');
  define('TYPE_BELOW', 'Type a choice below ...');

  define('ENTRY_COMPANY', 'Company Name:');
  define('ENTRY_COMPANY_ERROR', 'Please enter a company name.');
  define('ENTRY_COMPANY_TEXT', '');
  define('ENTRY_GENDER', 'Salutation:');
  define('ENTRY_GENDER_ERROR', 'Please choose a salutation.');
  define('ENTRY_GENDER_TEXT', '*');
  define('ENTRY_FIRST_NAME', 'First Name:');
  define('ENTRY_FIRST_NAME_ERROR', 'Is your first name correct? Our system requires a minimum of ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' characters. Please try again.');
  define('ENTRY_FIRST_NAME_TEXT', '*');
  define('ENTRY_LAST_NAME', 'Last Name:');
  define('ENTRY_LAST_NAME_ERROR', 'Is your last name correct? Our system requires a minimum of ' . ENTRY_LAST_NAME_MIN_LENGTH . ' characters. Please try again.');
  define('ENTRY_LAST_NAME_TEXT', '*');
  define('ENTRY_DATE_OF_BIRTH', 'Date of Birth:');
  define('ENTRY_DATE_OF_BIRTH_ERROR', 'Is your birth date correct? Our system requires the date in this format: DD/MM/YYYY (eg 21/05/1970)');
  define('ENTRY_DATE_OF_BIRTH_TEXT', '* (eg. 21/05/1970)');

All I'm seeing is a missing * (possibly) where it defines company name???
I have the "requires company name" for login details set to off...

anyone?? Its rather late here in aus and i have almost reached the limit of my patience with this particulare problem - I'm no net wiz, so any help greatly appreciated!!

23 Oct 2008, 2:51 PM
#38
get_bucked avatar

get_bucked

New Zenner

Join Date:
Oct 2008
Location:
Sydney, Oz-land
Posts:
45
Plugin Contributions:
0

Re: How do I change the Date format?

Right... feeling pretty stupid right about now, but have figured it out nonetheless...

Thanks Phill, you are as good as they say ;):clap:

19 Nov 2008, 8:19 AM
#39
demz001 avatar

demz001

New Zenner

Join Date:
Sep 2008
Location:
Gold Coast, Australia
Posts:
56
Plugin Contributions:
0

Re: How do I change the Date format?

I've got the same problem
I edited admin\includes\languages\english.php
and
includes\languages\english.php

Still getting the warning "Is your birth date correct? Our system requires the date in this format: MM/DD/YYYY (eg 05/21/1970)" after completing new account registration

Tooty Fruity

9 Feb 2009, 10:57 PM
#40
yz250 avatar

yz250

New Zenner

Join Date:
Dec 2008
Location:
Canberra, Australia
Posts:
83
Plugin Contributions:
0

Re: How do I change the Date format?

"I bought the Zen Book and it has saved me HOURS of frustration. Brilliant publication. Every novice should own it!!!! "

I second this.