I am getting "

DateTime::__construct(): Failed to pass time string (17/06/2019) 0(1):Unexpected character

error while saving product.

See the Screen shot below Image Here

What can be the issue and how to resolve it?

  • did you set the speical price from and to date ? – aravind Jul 25 at 6:25

try this fix https://github.com/magento/magento2/pull/18578/commits/88592facd5d34872ac2f2051dda246703091cacc

it worked for me in magento 2.2.6

if this not work Try this Module:- https://github.com/fernandofauth/magento2_datetime

  • I would like to add, this issue is seen at my clients end and not my end. When i do edits it works fine for me. but when my client try from their end, it gives such error. Do you feel its a code error? – Nafisa Jul 25 at 7:05
  • When this error display. add new product or edit product. – Mahendar Singh Jul 25 at 7:30
  • @Mahendra While editing. – Nafisa Jul 25 at 8:14
  • @MahendraSingh any idea about this? – Nafisa Aug 27 at 8:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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