New Zenner
- Join Date:
- Jun 2010
- Posts:
- 25
- Plugin Contributions:
- 0
Changing date format from word to numbers.
For example
Product added a 21 april 2009
t0 21/4/2009?
is there any way?
Views: 646
New Zenner
For example
Product added a 21 april 2009
t0 21/4/2009?
is there any way?
Administrator
In each main language file (e.g. /includes/languages/english.php) there are date-related formats:
define('DATE_FORMAT_SHORT', '%m/%d/%Y'); // this is used for strftime()
define('DATE_FORMAT_LONG', '%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');
If you change your DATE_FORMAT_LONG format to '%m/%d/%Y' then ALL the dates of that type (including order-related ones) will be formatted the way you indicated.
If you don't want all the "long" dates to have the m/d/y format, you can use your admin's Developer ToolKit to search for the string 'Product added on' to locate the name of the constant associated with that string and then search for that string's name to locate the PHP file that's producing the "product added on" <date> text and modify that file to use the DATE_FORMAT_SHORT date formatting.
Tell staff why this post should be reviewed.