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.


  • VBOX/Virtualbox how to resize the disk file image vdi
  • OpenVZ Error: Failed to load 2nd level quota solution
  • 99.99 % [jbd2/drbd0-8] highiowait
  • heartbeat cross talk
  • Openvz error solutions Container already locked (error) can't lock quota file, some quota operations are performing for id 1200
  • blocked for more than 120 seconds issues with iowait and timeout on Live Linux distribution while writing to physical disk
  • SELinux targeted policy relabel is required
  • possible SYN flooding on port 80. Sending cookies.
  • mdadm how to create mdadm.conf config file
  • Apache Centos Stopping httpd: [ OK ] Starting httpd: [Wed Jun 29 19:29:44 2016] [warn] _default_ VirtualHost overlap on port 80, the first has precedence [Wed Jun 29 19:29:44 2016] [warn] _default_ Virtual
  • The connection was reset The connection to the server was reset while the page was loading.
  • Openvz kernel: [10186978.064405] TCP: time wait bucket table overflow (CT3)
  • astrachat connection problems in Android 5.01 Lollipop
  • sed how to avoid escaping
  • Ubuntu/Debian OpenVZ Template Problems No Networking and SSH not starting
  • HTML files in Apache still displaying as raw text even with DefaultType, ForceType etc.
  • wget ignore robots.txt howto
  • Uploading Error HTTP error. Wordpress Upload Error Solution
  • mysql_real_escape_string returns an empty string solution
  • Script runs fine from shell but not from cron job in Linux/Unix Debian/Ubuntu/Mint/Centos