MySQL Date Time Data Types

what are the Date Time data types in MySQL ?


MySQL Date Time Data Types :

Different types of MySQL Date time Data types.
A Date. The range is 1000-01-01 to 9999-12-31. The date values are displayed in YYYY-MM-DD format.
A Time. The range is -838:59:59 to 838:59:59. The time values are displayed in HH:MM:SS format.
A Date and Time combination. The range is 1000-01-01 00:00:00 to 9999-12-31 23:59:59. The datetime values are displayed in YYYY-MM-DD HH:MM:SS format.
A Timestamp. The range is 1970-01-01 00:00:01 UTC to partway through the year 2037. A TIMESTAMP column is useful for recording the date and time of an INSERT or UPDATE operation.
A Year. The year values are displayed either in two-digit or four-digit format. The range of values for a four-digit is 1901 to 2155. For two-digit, the range is 70 to 69, representing years from 1970 to 2069.
For all the date and time columns, we can also assign the values using either string or numbers.These are the different types of Date and time data types in mysql.

Ask Questions

Ask Question