Post by aflores669 » Fri Oct 19, 2018 8:18 am

I am trying to change the date format in datepicker from YYYY-MM-DD and have had no luck with it so far. For example, under Returns section in admin panel, when I open the overview page, the date format is correct: http://prntscr.com/l7r14f
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.

Newbie

Posts

Joined
Thu Oct 18, 2018 10:42 am

Post by paulfeakins » Fri Oct 19, 2018 6:31 pm

Why do you want this?

For quick, professional OpenCart support please email info@antropy.co.uk


User avatar
Guru Member

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - Reigate, Surrey, United Kingdom

Post by aflores669 » Sat Oct 20, 2018 5:46 am

paulfeakins wrote:
Fri Oct 19, 2018 6:31 pm
Why do you want this?
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!

Newbie

Posts

Joined
Thu Oct 18, 2018 10:42 am

Post by aflores669 » Fri Oct 26, 2018 5:08 am

Anyone knows how to deal with this matter? I would really appreciate any useful information

Newbie

Posts

Joined
Thu Oct 18, 2018 10:42 am

Post by Yasabe » Mon Nov 05, 2018 6:05 pm

paulfeakins wrote:
Fri Oct 19, 2018 6:31 pm
Why do you want this?
;D ;D ;D 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.

New member

Posts

Joined
Fri Nov 14, 2014 11:56 pm

New member

Posts

Joined
Fri Nov 14, 2014 11:56 pm

Post by Yasabe » Mon Nov 12, 2018 6:26 pm

I've solved the problem by making the necessary changes. I have the required version for those who want to install Opencart in dd / mm / yyyy date format. You can send me a message if you want.

New member

Posts

Joined
Fri Nov 14, 2014 11:56 pm

Post by mrtexas » Tue Apr 23, 2019 11:21 am

paulfeakins wrote:
Fri Oct 19, 2018 6:31 pm
Why do you want this?
Obviously not everyone is in the UK...not exactly a proper question for this type of request, I call your question rude...

Newbie

Posts

Joined
Mon Apr 15, 2019 2:32 pm

Post by mrtexas » Tue Apr 23, 2019 11:25 am

Yasabe wrote:
Mon Nov 12, 2018 6:26 pm
I've solved the problem by making the necessary changes. I have the required version for those who want to install Opencart in dd / mm / yyyy date format. You can send me a message if you want.
Feel free to post it here anyway...

Newbie

Posts

Joined
Mon Apr 15, 2019 2:32 pm

Post by IP_CAM » Tue Apr 23, 2019 12:26 pm

Well, why not just publish it here? ???
Ernie

I am no longer active at the Forum. Please do NOT send me Personal Mails,
they will no longer be replied to.
My Github OC Site: https://github.com/IP-CAM
4'160 + FREE OC Extensions, on the World's largest Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland

Post by letxobnav » Tue Apr 23, 2019 4:53 pm

I have the required version for those who want to install Opencart in dd / mm / yyyy date format
Yes please publish an new version of OC to fix date formatting...

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.


User avatar
Expert Member

Posts

Joined
Fri Aug 18, 2017 4:35 pm
Location - Taiwan

Post by thekrotek » Tue Apr 23, 2019 5:31 pm

Yasabe wrote:
Mon Nov 05, 2018 6:05 pm
D ;D ;D 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.
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.

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


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by geoffreydodd » Sat Aug 24, 2019 6:36 am

It'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:

Code: Select all

$_['date_format_short']             = 'd/m/Y';
$_['datetime_format']               = 'd/m/Y H:i:s';
Change to:

Code: Select all

$_['date_format_short']             = 'm/d/Y';
$_['datetime_format']               = 'm/d/Y H:i:s';

Newbie

Posts

Joined
Sat Aug 24, 2019 6:31 am

Post by thekrotek » Sat Aug 24, 2019 3:18 pm

geoffreydodd wrote:
Sat Aug 24, 2019 6:36 am
It'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.
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.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by IsmaelPR1 » Thu Sep 19, 2019 9:21 pm

geoffreydodd wrote:
Sat Aug 24, 2019 6:36 am
It'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:

Code: Select all

$_['date_format_short']             = 'd/m/Y';
$_['datetime_format']               = 'd/m/Y H:i:s';
Change to:

Code: Select all

$_['date_format_short']             = 'm/d/Y';
$_['datetime_format']               = 'm/d/Y H:i:s';
I couldn't agree more! But thank you sir for proving a working solution.

Newbie

Posts

Joined
Sat Oct 21, 2017 1:30 am

Post by adifyz » Sun Nov 24, 2019 4:58 am

Does this work with oc 3.0.3.2 ? I am in US have dates on orders that are m/d/y should be d/m/y how do I fix that?
Does it need to be fixed in php or can it be done in twig?

Best Regards

Newbie

Posts

Joined
Wed Oct 02, 2019 9:57 am

Post by MysticKnight » Mon May 11, 2020 2:50 pm

geoffreydodd wrote:
Sat Aug 24, 2019 6:36 am
It'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:

Code: Select all

$_['date_format_short']             = 'd/m/Y';
$_['datetime_format']               = 'd/m/Y H:i:s';
Change to:

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.

Bill Elgin
Custom Website Design
www.billelgin.com


New member

Posts

Joined
Sat Jan 04, 2020 9:43 am


Post by Yasabe » Sun Jan 10, 2021 5:52 am

Hello friends.
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.

Attachments


New member

Posts

Joined
Fri Nov 14, 2014 11:56 pm

Post by tingwing » Tue Mar 23, 2021 4:28 pm

it works ,you are the hero,shame on those guy talking about question.
geoffreydodd wrote:
Sat Aug 24, 2019 6:36 am
It'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:

Code: Select all

$_['date_format_short']             = 'd/m/Y';
$_['datetime_format']               = 'd/m/Y H:i:s';
Change to:

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


Active Member

Posts

Joined
Tue Aug 02, 2016 9:01 pm
Who is online

Users browsing this forum: No registered users and 22 guests