$date = $_POST['date']; $standardDate("Y-m-d H:i:s", strtotime($date)); $sql="insert into tabla1 set date=$standardDate";