However, when I open specific item, the date format is as follows: http://prntscr.com/l7r1a2 . How do I change it, so it is DD-MM-YYYY? Is there any specific file(s) I should edit? Or maybe there is some kind of extension for this purpose?
I have looked through multiple threads on the web, but was unable to find any solution. Thanks in advance.
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Well, it is obvious that date format should not be like this, when it is set as DD-MM-YYYY on the whole website. No country in the world uses such date format, so I can see no reason why it should be used by default at all. Maybe you have some suggestions on how to deal with this matter? Would appreciate any useful information!
The following questions should be asked: How many countries use the YYYY-MM-DD date format? Almost the whole world is using the DD-MM-YYYY date format. So why didn't Opencart make the date format selectable? Why are you asking questions instead of helping? Obviously he thought it was necessary. I've been having the same problem and I couldn't figure it out.
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Yes please publish an new version of OC to fix date formatting...I have the required version for those who want to install Opencart in dd / mm / yyyy date format
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
It's not about which format is used in which country, but which type of database table field is used. OpenCart uses DATE (YYYY-MM-DD) or DATETIME (YYYY-MM-DD HH:MM:SS) everywhere, which has its perks, but also has a lot of drawbacks. One of them is that you always need to convert values to proper format. Apparently, it's much easier to use the same format (YYYY-MM-DD) in the input field and then just pass a raw data to the query. If you change this format in input field, you will also have to convert it to proper format, which DATE or DATETIME field accepts.Yasabe wrote: ↑Mon Nov 05, 2018 6:05 pmD The following questions should be asked: How many countries use the YYYY-MM-DD date format? Almost the whole world is using the DD-MM-YYYY date format. So why didn't Opencart make the date format selectable? Why are you asking questions instead of helping? Obviously he thought it was necessary. I've been having the same problem and I couldn't figure it out.
This is why I always use INT and save UNIX timestamp instead of formatted data. Much easier to work with data this way.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
HERE'S THE ANSWER
Open the following files:
admin/language/en-gb/en-gb.php
and
catalog/language/en-gb/en-gb.php
Find:
Code: Select all
$_['date_format_short'] = 'd/m/Y';
$_['datetime_format'] = 'd/m/Y H:i:s';
Code: Select all
$_['date_format_short'] = 'm/d/Y';
$_['datetime_format'] = 'm/d/Y H:i:s';
It is amazing, how stupid your reply is, because OP asked about date format IN DATEPICKER, which is hardcoded in templates and has nothing to do with date formal set in language files.geoffreydodd wrote: ↑Sat Aug 24, 2019 6:36 amIt's amazing how stupid the posted replies are on here. Instead of answering the question, they offer private support or question why you want to change it.
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
I couldn't agree more! But thank you sir for proving a working solution.geoffreydodd wrote: ↑Sat Aug 24, 2019 6:36 amIt's amazing how stupid the posted replies are on here. Instead of answering the question, they offer private support or question why you want to change it.
HERE'S THE ANSWER
Open the following files:
admin/language/en-gb/en-gb.php
and
catalog/language/en-gb/en-gb.php
Find:Change to:Code: Select all
$_['date_format_short'] = 'd/m/Y'; $_['datetime_format'] = 'd/m/Y H:i:s';
Code: Select all
$_['date_format_short'] = 'm/d/Y'; $_['datetime_format'] = 'm/d/Y H:i:s';
Thanks geoffreydodd for contributing to the community. Your simple answer allows us to use whatever date format we need for our location.geoffreydodd wrote: ↑Sat Aug 24, 2019 6:36 amIt's amazing how stupid the posted replies are on here. Instead of answering the question, they offer private support or question why you want to change it.
HERE'S THE ANSWER
Open the following files:
admin/language/en-gb/en-gb.php
and
catalog/language/en-gb/en-gb.php
Find:Change to:Code: Select all
$_['date_format_short'] = 'd/m/Y'; $_['datetime_format'] = 'd/m/Y H:i:s';
Code: Select all
$_['date_format_short'] = 'm/d/Y'; $_['datetime_format'] = 'm/d/Y H:i:s';
Bill Elgin
Custom Website Design
www.billelgin.com
I converted Opencart's date format to DD-MM-YYYY by changing some files under the admin and catalog folders. By pasting this package on your existing Opencart package, you get the desired result. This package is prepared for the default theme. It will probably work with themes installed later, but if there is something missing, you can open the related files and change the places where it says YYYY-MM-DD to DD-MM-YYYY. If you do the process on a previously installed version, click the gear at the top right from the Control Panel to empty the theme cache. I hope you will be satisfied using it.
geoffreydodd wrote: ↑Sat Aug 24, 2019 6:36 amIt's amazing how stupid the posted replies are on here. Instead of answering the question, they offer private support or question why you want to change it.
HERE'S THE ANSWER
Open the following files:
admin/language/en-gb/en-gb.php
and
catalog/language/en-gb/en-gb.php
Find:Change to:Code: Select all
$_['date_format_short'] = 'd/m/Y'; $_['datetime_format'] = 'd/m/Y H:i:s';
Code: Select all
$_['date_format_short'] = 'm/d/Y'; $_['datetime_format'] = 'm/d/Y H:i:s';
my extension:https://www.opencart.com/index.php?rout ... estshop24h
email :support@bestshop24h.com
site:http://www.bestshop24h.com
Thank you so much. It works like a charmgeoffreydodd wrote: ↑Sat Aug 24, 2019 6:36 amIt's amazing how stupid the posted replies are on here. Instead of answering the question, they offer private support or question why you want to change it.
HERE'S THE ANSWER
Open the following files:
admin/language/en-gb/en-gb.php
and
catalog/language/en-gb/en-gb.php
Find:Change to:Code: Select all
$_['date_format_short'] = 'd/m/Y'; $_['datetime_format'] = 'd/m/Y H:i:s';
Code: Select all
$_['date_format_short'] = 'm/d/Y'; $_['datetime_format'] = 'm/d/Y H:i:s';
Users browsing this forum: Bing [Bot], kirkhall and 18 guests