I'll try format datetime like this Thu Jun 15 2017 14:12:28 GMT 0700 (SE Asia Standard Time)
to format like 2017-06-5
in PHP. I use date_create
but have errorl like this
Warning: date_format() expects parameter 1 to be DateTimeInterface, string given
and this my PHP code
$aa = date_format($w22,"Y-m-d");
echo $aa;
content from $22 is Thu Jun 15 2017 14:12:28 GMT 0700 (SE Asia Standard Time)
how to format datetime like mine, please help me to solved my problem. Thanks