我的日期格式为m-d-y。现在我想将它转换成YMD格式在PHP日期格式需要转换
<input class="form-control form-control-inline input-medium default-date-picker" size="16" type="text" name="from_date" id="from_date" value="" />
PHP
$from_datenew = date('Y-m-d',strtotime($_POST['from_date']));
和http://stackoverflow.com/questions/21406665/convert-from-one-date-format-to-another-in-php/21406743#21406743 –