Date-related Data Types : Date « Data Types « MySQL Tutorial






MySQL offers DATETIME, DATE, TIME, YEAR, and TIMESTAMP types.

Data TypeStandard FormatZero value
DATETIMEYYYY-MM-DD HH:MM:SS0000-00-00 00:00:00
DATEYYYY-MM-DD0000-00-00
TIMEHH:MM:SS00:00:00
YEARYYYY0000
TIMESTAMPVaries00000000000000


10.6.Date
10.6.1.Date-related Data Types
10.6.2.Working With Dates
10.6.3.Use Update statement to set a date column value
10.6.4.Compare date column