title: MySQL 1292 Truncated incorrect datetime value: '2020-01-02 07:15:00'
body: <p>I am trying to insert a Datetime field by concatenating a Date and Time field. </p>
  
  <p>Om my local Mysql its working with a warning message , on the server its failing with the same message.</p>
  
  <p>Any help on this please  </p>
  
  <p>Source table (shift details) - </p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `shift_t` (
    `ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `Name` varchar(20) NOT NULL,
    `NameShort` varchar(10) NOT NULL,
    `WeekType` varchar(4) NOT NULL,
    `DayOfWeek` char(3) NOT NULL DEFAULT '0',
    `StartTime` time NOT NULL DEFAULT '00:00:00',
    `EndTime` time NOT NULL DEFAULT '00:00:00',
    `LineID` int(10) unsigned NOT NULL DEFAULT 0,
    `PlantID` int(10) unsigned NOT NULL
  )
  </code></pre>
  
  <p>Example of table to load ..</p>
  
  <pre><code>CREATE temporary TABLE shifttemp1 (
    plantid int(10) unsigned NOT NULL,
    lineid int(10) unsigned NOT NULL,
    starttime time NOT NULL,
    shiftstart1 datetime DEFAULT NULL
  );
  
  INSERT INTO shifttemp1
  ( plantid,lineid,starttime,shiftstart1)
  SELECT    shf.plantid, 
            shf.lineid,
               shf.starttime,
            Str_to_date(CONCAT('2020-01-02', ' ', shf.starttime), '%Y-%m-%d %H:%i')  shiftstart1  
     from shift_t  shf 
      WHERE shf.dayofweek = 'MON' 
      AND shf.lineid = 31 
       AND shf.nameshort = 'DAY'     ;
  </code></pre>
  
  <p>Error message </p>
  
  <pre><code>1292 Truncated incorrect datetime value: '2020-01-02 07:15:00'
  </code></pre>