Eagle75 Posted November 28, 2004 Posted November 28, 2004 i was wondering in anyone knows how i can change the Date format to dd/mm/yyyy instead of mm/dd/yyy ? i live in Australia and we do not use mm/dd/yyyy format here.
Guest Posted November 28, 2004 Posted November 28, 2004 i was wondering in anyone knows how i can change the Date format to dd/mm/yyyy instead of mm/dd/yyy ? i live in Australia and we do not use mm/dd/yyyy format here. <{POST_SNAPBACK}> Hello, You can find the code in catalog/includes/languages/english.php or whichever language There is the code for stripping the date that the customer needs to put int. It says like 3,2 and 0,2 that you will need to change around to the oposite like 0,2 and 3,2 in that order. Regards Richard B)
Guest Posted November 28, 2004 Posted November 28, 2004 Here is the code: 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'); //// // Return date in raw format // $date should be in format mm/dd/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY function tep_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2); } }
Eagle75 Posted November 28, 2004 Author Posted November 28, 2004 Here is the code: 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'); //// // Return date in raw format // $date should be in format mm/dd/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY function tep_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2); } } <{POST_SNAPBACK}> thx for the reply ....... i changed the date format but its is still showin me as mm/dd/yyyy? when i go to add a product it asks what date to start from but still in that format.
Guest Posted November 28, 2004 Posted November 28, 2004 thx for the reply ....... i changed the date format but its is still showin me as mm/dd/yyyy? when i go to add a product it asks what date to start from but still in that format. <{POST_SNAPBACK}> That is just text that is showing. That you can check also in the english.php file. Here is the code for that // text for date of birth example define('DOB_FORMAT_STRING', 'mm/dd/yyyy'); Just change it to dd/mm/yyyy Regards Richard
Eagle75 Posted November 28, 2004 Author Posted November 28, 2004 hi again, i changed everything u said but ..... now when i enter a product available for eg. 24/11/2004 it shows down bottom of page available in eg. 4th October 2029 i dont know what ive done wrong plz help!!
cjohnson_uk Posted November 30, 2004 Posted November 30, 2004 thx for the reply ....... i changed the date format but its is still showin me as mm/dd/yyyy? when i go to add a product it asks what date to start from but still in that format. <{POST_SNAPBACK}> I've got the same problem. I've switched the order that the date is built/reorganised by substr but do I have to change the define statements too? I did try that after but got no luck there either. All the text shows correctly (the labels) but it still errors when I put in a date with a first number pair (my dd) greater than 12 (it hinks its still mm). Any other suggestions? ChrisJ
cjohnson_uk Posted November 30, 2004 Posted November 30, 2004 thx for the reply ....... i changed the date format but its is still showin me as mm/dd/yyyy? when i go to add a product it asks what date to start from but still in that format. <{POST_SNAPBACK}> Eagle: Sounds like the numbers in the date have got mixed somehow. If you still have european languages installed (german and spanish) they use the date format dd/mm/yy). There might be some mileage in looking to see how its done there. Thats where I'm looking at the moment. Remember the date format for the account settings is most likely different to that for the product added dates! I've got the same problem. I've switched the order that the date is built/reorganised by substr but do I have to change the define statements too? I did try that after but got no luck there either. All the text shows correctly (the labels) but it still errors when I put in a date with a first number pair (my dd) greater than 12 (it hinks its still mm). Any other suggestions? ChrisJ
♥Vger Posted November 30, 2004 Posted November 30, 2004 Don't forget that you also have to change how admin handles the date in admin/includes/languages/english.php Vger
gregy Posted December 8, 2004 Posted December 8, 2004 Don't forget that you also have to change how admin handles the date in admin/includes/languages/english.php Vger <{POST_SNAPBACK}> hmm .. and how to set dd.mm.YYYY instead of dd/mm/YYYY ? thanx
cjohnson_uk Posted December 9, 2004 Posted December 9, 2004 hmm .. and how to set dd.mm.YYYY instead of dd/mm/YYYY ? thanx <{POST_SNAPBACK}> You could try substituting / with . in // text for date of birth example define('DOB_FORMAT_STRING', 'mm/dd/yyyy'); inteh file the english.php file. if not try the same in the following lines 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'); HTH Chris
gregy Posted December 9, 2004 Posted December 9, 2004 You could try substituting / with . in // text for date of birth example define('DOB_FORMAT_STRING', 'mm/dd/yyyy'); inteh file the english.php file. if not try the same in the following lines 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'); HTH Chris <{POST_SNAPBACK}> thanx Chris .. that did the trick .. actually i was thinking about this .. but i rather asked .. how stupid me ,,, i was waitting for one day for answers instead of try this first :) .. well we learn on our own mistakes .. thanx again
Recommended Posts
Archived
This topic is now archived and is closed to further replies.