Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Date format error!


Recommended Posts

I have followed the FAQ to change the date format exactly.


I have changed it from MM/DD/YYYY to DD/MM/YYYY.


I can select the date correctly and it shows up in the field perfectly.


However when I send the Account Creation form, I receive an error back saying " Your Date of Birth must be in this format: DD/MM/YYYY (eg 20/12/1970)".


Is there another mod I need to do other than what's listed in the FAQ?


Many thanks.

Link to comment
Share on other sites

I believe you also need to change the code after



// Return date in raw format


which is in the same files to



// 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, 0, 2) . substr($date, 3, 2) . substr($date, 6, 4);

} else {

return substr($date, 6, 4) . substr($date, 3, 2) . substr($date, 0, 2);




the part of the above code that has been changed is the two return substr lines.


Do the same in your admin files.


I use the english date format and i changed this aswell and all seems to work.


Link to comment
Share on other sites

  • 1 month later...

Still don't know why this happens, but it can be changed in the Admin pages: Localization>Currencies. Edit the cuurency concerned, and remove the offending A from the Symbol Left field. Thius will change all future transactions and views, though not necessarily all instances in past orders, etc.

Link to comment
Share on other sites

  • 7 months later...


This topic is now archived and is closed to further replies.

  • Create New...