I am getting below error when I am trying to update a table with a field(datetime)
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[2007]: Invalid datetime format: 1292 Incorrect datetime value: '02-27-2017 16:37' for column lastupated
My PHP code uses PDO
$lastupdated = date('m-d-Y H:i:s');
$run = $conn->prepare($sql);
$run->bindParam(':lastupdated', $lastupdated, PDO::PARAM_STR);
the SQL
the lastupdated, datatype is datetime
Existing data