MySQL data type representing date
Type name | Date format | Date range | Storage requirements |
YEAR | YYYY | 1901 ~ 2155 | 1 bytes |
TIME | HH:MM:SS | -838:59:59 ~ 838:59:59 | 3 bytes |
DATE | YYYY-MM-DD | 1000-01-01 ~ 9999-12-3 | 3 bytes |
DATETIME | YYYY-MM-DD HH:MM:SS | 1000-01-01 00:00:00 ~ 9999-12-31 23:59:59 | 8 Bytes |
TIMESTAMP | YYYY-MM-DD HH:MM:SS | 1980-01-01 00:00:01 UTC ~ 2040-01-19 03:14:07 UTC | 4 bytes |
Recommended: "mysql video Tutorial》
The above is the detailed content of A brief summary of the data types used to represent dates in MySQL. For more information, please follow other related articles on the PHP Chinese website!