MySQL Out of Range Solution for DATETIME field -

MySQL Out of Range Solution for DATETIME field

Affected rows: 0
Warning: #1264 Out of range value adjusted for column 'deleteon' at row 1
SQL query:
UPDATE `custtable`.`custinfo` SET `deleteon` = '2011-02-29 00:00:00' WHERE `custinfo`.`custid` =105 LIMIT 1 ;

This happened after a migration to a new SQL database due to user error.  The old database server MySQL 3.23 or 4 allowed an impossible date to be entered by a user.  As we know February 29th DOES NOT exist but the database allowed the value.  MySQL 5.0 is smarter and rejected it and ended up setting a blank value for that field.  It was hard to troubleshoot at first until we actually looked at the date :)

So the solution is to use Feb-28th or March 1st since the 29th does not exist.

  • Location of cPanel apache access logs
  • Windows showing wrong drive size after resizing the VPS/image or cloning howto fix
  • How to manually save bash history
  • Linux how to combine images into a single one using convert from ImageMagick
  • Mysql how to backup/copy row from one table to another
  • mdadm real example of recovery and rebuilding of the array on Centos 6
  • Microsoft Access .mdb files how to view them on Linux Ubuntu/Debian
  • Centos 6 how to guide convert LVM non-RAID into mdadm 1/10 RAID array live without reinstalling
  • Centos cannot login by console or ssh session closed immediately
  • openvz yum problem Centos 6.5 cannot find file on mirror:
  • mount -o bind permanent in /etc/fstab howto
  • Virtualbox errors on Ubuntu/Debian/Mint
  • How To Install Linux Mint 17.2 on mdadm RAID with a separate boot partition
  • Linux sudo config sudoers to run command without a password howto
  • ONVIF Linux Security Camera Setup
  • clamav freshclam out of date won't update solution
  • Installing zoneminder on Ubuntu/Debian Linux Howto
  • status: { DRDY ERR } error: { ICRC ABRT } failed command: WRITE FPDMA QUEUED MCP55 Linux Errors
  • bash script get directory location and path of script howto tutorial
  • initial Main Mode message received on but no connection has been authorized with policy=PSK