The date after the selection in input has the form December 31, 2016, how can I write it in the database, if there I need it to be in Ymd format?
$termin = $product['date_available']; //здесь я получаю дату в формате dd.mm.yyyy $this->data['date_available'] = date("DmY", strtotime($termin)); //сюда нужно передать дату в формате yyyy-mm-dd
Dand notd? and the date format in the database is usually yyyy-mm-dd, i.e.Ymd- AlexD, notd- it will output2016-10-Sat, and you need2016-10-29, i.e.Ymd- AlexDmYtoYmd. those. You are trying to insert the date29-10-2016, but you need2016-10-29. - Alex