-2

I am parsing a html page by simple_dom and got this date : Thu, Jun 9, 2022 that has to be converted into date with format Y-m-d Any help how to do that will be highly appreciated Thanks

Europeuser
  • 934
  • 1
  • 9
  • 32
  • 3
    Does this answer your question? [Convert a date format in PHP](https://stackoverflow.com/questions/2487921/convert-a-date-format-in-php) – Mime Jun 22 '22 at 10:49

1 Answers1

1
echo date('Y-m-d',strtotime('Thu, Jun 9, 2022'));

Demo

toffler
  • 1,231
  • 10
  • 27