DATE, TIME, DATETIME, TIMESTAMP, and YEAR form the group of date and time data types for storing temporal values. Each of these types has a range of permitted values. Apart from the permitted values, a special zero value can also be used to specify an invalid value which MySQL cannot represent. The zero value can be 00-00-0000. MySQL allows this value to be stored in a date column. This is sometimes more convenient than storing NULL values.
The following are the general considerations we must take care of while working with date and time types.
The way MySQL treats storage and retrieval operations for date or time types is different in the context of the format. Basically, for a date or time type value stored in the table, MySQL retrieves values in a standard output format. In the case of inputting a date or time type value, MySQL attempts to apply different...