I'm trying to insert date into my DB but sql calculates the result always is 1997 in the fields I tested as "date" and did not insert "varchar and text" resulted me a calculation of subtraction of the current date
$conn = new PDO('mysql:host=localhost;dbname=data', 'root');
$query = 'INSERT INTO codes (code,dt) VALUES ('.$generator.','.$data_atual.')';
?>