1

How to set format datetime for all system ?

Such as: date attributes of entity(product, customer etc), import, export etc

Anyone know, please show me step by step.

2
  • I don't fully understand what is mean "format datetime for all system"? Datetime is formatted based on locale
    – KAndy
    Mar 24, 2016 at 9:03
  • @Kandy we are facing same issue need date time format dd/mm/yyyy but its showing mm/dd/yyyy Mar 31, 2016 at 7:48

1 Answer 1

1

You need override date.js file from:

vendor/magento/Magento_Ui/web/js/form/element/date.js

To your vendor/Theme, ex.:

/app/design/frontend/Your_Vendor_Name\Your_Theme_Name/Magento_Ui/web/js/form/element/date.js

Choose your features and date format options and deploy new static files:

sudo rm -rf pub/static/*

And run Magento2 CLI command:

php -f bin/magento setup:static-content:deploy en_US 

If Magento Cache in use/enable, need clean , run command:

php -f bin/magento cache:clean

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.