Data type | Description |
---|---|
DATE() | A date. Format: YYYY-MM-DDNote: The supported range is from '1000-01-01' to '9999-12-31' |
DATETIME() | *A date and time combination. Format: YYYY-MM-DD HH:MM:SSNote: The supported range is from '1000-01-01 00:00:00' to '9999-12-31 23:59:59' |
TIMESTAMP() | *A timestamp. TIMESTAMP values are stored as the number of seconds since the Unix epoch ('1970-01-01 00:00:00' UTC). Format: YYYY-MM-DD HH:MM:SSNote: The supported range is from '1970-01-01 00:00:01' UTC to '2038-01-09 03:14:07' UTC |
TIME() | A time. Format: HH:MM:SSNote: The supported range is from '-838:59:59' to '838:59:59' |
YEAR() | A year in two-digit or four-digit format. Note: Values allowed in four-digit format: 1901 to 2155. Values allowed in two-digit format: 70 to 69, representing years from 1970 to 2069 |
Search This Blog
Data Types in MySQL - Date Types
Labels:
Data Types,
Date Types
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment