Current_time Display current time now () displays the current datetime date and time type Year 1 byte 1901~2155 0 value 0000DATE 4 byte 1000-01-01~9999-12-31 0 value 0000:00:00time 3 bytes- 838:59:59~838:59:59 0 Value 00:00:00datetime 8 byte 1000-01-01 00:00:00~9999-12-31 23:59:59 0 value 0000-00-00 00:00:00timestamp 4 bytes 19700101080001~20380119111407 00000000000000 Note: Inserting the data beyond the range inserts 0 values into the database table in the year type insert format 0000 or "0000" Time Type Insert format "D HH:MM:SS" ( This should have quotation marks, D for the number of days, d*24 after the hour), or number format HHMMSS or string format "Hhmmss" (both of which have the same quotation marks), display format HH:MM:SS, delimiter cannot be used other symbols, minutes, seconds range 0~59, the hour range 0~ 23 Example: Insert "2 23:50:50", "22:22:22", "11:11", "2 20", "30" into the table: 71:50:50,22:22:22,11:11:00,68,00:00:30date type Insert Format: " Yyyy-mm-dd "or" YYYYMMDD "format string representation, and any punctuation can also be used as separators such as: ' @ ', ' * ', display format YYYY-MM-DD. DATETIME type Insert format: "Yyyy-mm-dd HH:MM:SS" or "YYYYMMDDHHMMSS", display format: "Yyyy-mm-dd HH:MM:SS", In addition, any punctuation can also be used as a delimiter timestamp type format date and time insert format and display format are consistent with DateTime types, and date ranges are smaller than datetime types. Any punctuation marks can also be used as separators. Enter Current_timestamp or enter null or no input to insert the current date and time into the system. Note: This type of time is displayed according to the time zone, such as in the East eight area inserted in the time of 2008-09-30 14:21:25, in the East seven area shown as 2008-09-30 13:21:25.
MySQL Date and Time type