Home > OS >  How to convert a date in php
How to convert a date in php

Time:06-23

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

CodePudding user response:

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

Demo

  • Related