- Reference
- Format: "yyyy-mm-dd"
- Any character may be used as a delimiter
- SELECT DATE ("2015/02/24");
- No delimiters work, but not exactly as expected.
- It will deal with '02-02-14"
-
INSERT INTO FARM
(Name, Sex, DatePurchased) VALUES ("test","M","02-02-14");
- The man page says
- Year values in the range 70-99 are converted to 1970-1999.
- Year values in the range 00-69 are converted to 2000-2069.
- Invalid dates are turned to ZERO
INSERT INTO FARM
(Name, Sex, DatePurchased)
VALUES
("test","M","02-02-34");
- Dates can be null
INSERT INTO FARM
(Name, Sex, DatePurchased)
VALUES
("test","M",NULL);
- But much of this depends on the local MySQL configuration
- NO_ZERO_DATE
- ALOOW_INVALID_DATES