MySQL - What are date and time data types supported in MySQL?

What are date and time data types supported in MySQL?

MySQL supports the following date and time data types:

1. DATE - A date in the range of '1000-01-01' and '9999-12-31'. Default DATE format is "YYYY-MM-DD".

2. DATETIME - A date with the time of day in the range of '1000-01-01 00:00:00' and '9999-12-31 23:59:59'. Default DATETIME format is "YYYY-MM-DD HH:MM:SS".

3. TIMESTAMP - A timestamp. The range is '1970-01-01 00:00:00' to partway through the year 2037. Default DATETIME format is "YYYY-MM-DD HH:MM:SS".

4. TIME - A time. The range is '-838:59:59' to '838:59:59'. Default TIME format is "HH:MM:SS".

5. YEAR - A year in 4 digits in the range of 1901 and 2155. Default YEAR format is "YYYY".
MySQL - IN Conditions and LIKE Conditions in MySQL
IN Conditions and LIKE Conditions in MySQL - IN condition is used to match specified values in a query......
MySQL - Regular expression pattern condition: REGEXP in MySQL
Regular expression pattern condition: REGEXP in MySQL - REGEXP is used to match a string against a specified pattern. There are different operators used to match patterns......
MySQL - Explain CASE Expression in MySQL with syntax
Explain CASE Expression in MySQL with syntax - CASE statement is a conditional expression. It is used to execute specific statements when some search condition evaluates to TRUE......
Post your comment