title: MySQL Incorrect DateTime Value for Date older than 1980
body: <p>While, trying to import a .sql file into my database, I am getting the following error for one of the insert statements -</p>
  
  <pre><code>ERROR 1292 (22007) at line 31504: Incorrect datetime value: '1936-01-31 00:00:00' for column 'BatchDate' at row 1. Operation failed with exitcode 1
  </code></pre>
  
  <p>I am facing this error only for dates older than 1980. and its happening only while I am trying to import the dump through import statement or through WorkBench. If I execute the statement alone, it works fine. Here is the table structure and the insert statement</p>
  
  <pre><code>DROP TABLE IF EXISTS `BatchEntry`;
  
  CREATE TABLE `BatchEntry` (
    `BatchNo` INTEGER NOT NULL AUTO_INCREMENT, 
    `BatchDate` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, 
    `BTax_ID` DOUBLE NULL DEFAULT 0, 
    `BPayor_No` DOUBLE NULL DEFAULT 0, 
    `BBroker_No` DOUBLE NULL DEFAULT 0, 
    `BHam_Cont` VARCHAR(4), 
    `BInv_Org_Date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, 
    `BInv_Due_Date` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, 
    `BDate_Adv` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, 
    `BRec_Amt` DECIMAL(19,4) DEFAULT 0, 
    `BPaymnt_Com` LONGTEXT, 
    `BTrans_Count` INTEGER DEFAULT 0, 
    `BPrefix` VARCHAR(10), 
    `BStartNumber` INTEGER DEFAULT 0, 
    `BSuffix` VARCHAR(10), 
    `BCreated` TINYINT(1) DEFAULT 0, 
    `BAdvMethod` INTEGER DEFAULT 0, 
    INDEX (`BPayor_No`), 
    INDEX (`BTax_ID`), 
    PRIMARY KEY (`BatchNo`)
  ) ENGINE=myisam DEFAULT CHARSET=utf8;
  
  INSERT INTO `BatchEntry` (`BatchNo`, `BatchDate`, `BTax_ID`, `BPayor_No`, `BBroker_No`, `BHam_Cont`, `BInv_Org_Date`, `BInv_Due_Date`, `BDate_Adv`, `BRec_Amt`, `BPaymnt_Com`, `BTrans_Count`, `BPrefix`, `BStartNumber`, `BSuffix`, `BCreated`, `BAdvMethod`) VALUES (1396, '1936-01-31 00:00:00', 561986585, 4528, 749, 'BSR', '2005-12-30 00:00:00', '2006-01-30 00:00:00', '2006-01-31 00:00:00', 0, NULL, 14, 'MC', 24850, NULL, 1, 1);
  </code></pre>