mirror of
https://github.com/MariaDB/server.git
synced 2026-05-10 00:54:30 +02:00
Documented server behaviour for out-of-range dates.
This commit is contained in:
parent
5227a8b144
commit
f09488d671
1 changed files with 9 additions and 0 deletions
|
|
@ -29339,6 +29339,15 @@ interpreted as the year @code{'2010-11-12'}. The value @code{'10:45:15'}
|
|||
will be converted to @code{'0000-00-00'} because @code{'45'} is not a legal
|
||||
month.
|
||||
|
||||
@item
|
||||
The MySQL server only performs basic checking on the validity of a date:
|
||||
days @code{00-31}, months @code{00-12}, years @code{1000-9999}.
|
||||
Any date not within this range will revert to @code{0000-00-00}.
|
||||
Please note that this still allows you to store invalid dates such as
|
||||
@code{2002-04-31}. It allows web applications to store data from a form
|
||||
without further checking. To ensure a date is valid, perform a check in
|
||||
your application.
|
||||
|
||||
@item
|
||||
Year values specified as two digits are ambiguous, because the century is
|
||||
unknown. MySQL interprets 2-digit year values using the following
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue