I am passing jQuery date in backend. date is Thu Jun 01 2017 00:00:00 GMT 0530 (India Standard Time).
I want to convert this date in 2017-06-19 this format but in php.
$date_str='Thu Jun 01 2017 00:00:00 GMT 0530 (India Standard Time)';
echo date_format(date_create_from_format('Y-m-d', $date_str), 'd-m-Y');
I have tried this solution but it is not working for me.