(mysql.info.gz) Y2K issues
Info Catalog
(mysql.info.gz) YEAR
(mysql.info.gz) Date and time types
11.3.4 Y2K Issues and Date Types
--------------------------------
MySQL itself is year 2000 (Y2K) safe ( Year 2000 compliance),
but input values presented to MySQL may not be. Any input containing
two-digit year values is ambiguous, because the century is unknown.
Such values must be interpreted into four-digit form because MySQL
stores years internally using four digits.
For `DATETIME', `DATE', `TIMESTAMP', and `YEAR' types, MySQL interprets
dates with ambiguous year values using the following rules:
* Year values in the range `00-69' are converted to `2000-2069'.
* Year values in the range `70-99' are converted to `1970-1999'.
Remember that these rules provide only reasonable guesses as to what
your data values mean. If the heuristics used by MySQL do not produce
the correct values, you should provide unambiguous input containing
four-digit year values.
`ORDER BY' properly sorts `TIMESTAMP' or `YEAR' values that have
two-digit years.
Some functions like `MIN()' and `MAX()' will convert a `TIMESTAMP' or
`YEAR' to a number. This means that a value with a two-digit year will
not work properly with these functions. The fix in this case is to
convert the `TIMESTAMP' or `YEAR' to four-digit year format or use
something like `MIN(DATE_ADD(timestamp,INTERVAL 0 DAYS))'.
Info Catalog
(mysql.info.gz) YEAR
(mysql.info.gz) Date and time types
automatically generated byinfo2html