When MySQL encounters a value for a date or time type that is out of range or otherwise illegal for the type (as described at the beginning of this section), it converts the value to the ``zero'' value for that type.
MySQL allows you to store certain ``not strictly legal'' date values, such as '1999-11-31'. The reason for this is that we consider date checking to be the responsibility of the application, not the SQL server. To make date checking faster, MySQL verifies only that the month is in the range from 0 to 12 and that the day is in the range from 0 to 31. These ranges are defined to include zero because MySQL allows you to store dates where the day or month and day are zero in a DATE or DATETIME column. This is extremely useful for applications that need to store a birthdate for which you don't know the exact date. In this case, you simply store the date like '1999-00-00' or '1999-01-00'. Note that if you store dates like these, you should not expect to get correct results for such as DATE_SUB() or DATE_ADD that require complete dates.