如何在页面中存储phpmyadmin时转换日期格式

How to change the normal input date format dd-mm-yyyy in the webpage to yyyy-mm-dd while storing in the php my admins

you can convert the date with strtotime();

  $dateToday = date("d-m-Y");
    $newDate = date("Y-m-d", strtotime($dateToday));

And then you can store data to your database.

Although you can use strtotime, I much prefer DateTime object.

//The second parameter being the string from the database.
$date = DateTime::createFromFormat('d-m-Y', '27-10-2014');
echo $date->format('Y-m-d');