SQL Tutorial

13 / 68

MySQL Data Types ... continued

Date and Time Types

  • DATE - Date in YYYY-MM-DD format, between 1000-01-01 and 9999-12-31. Ex - 2018-06-28

  • DATETIME - Date/time in YYYY-MM-DD HH:MM:SS format, between 1000-01-01 00:00:00 and 9999-12-31 23:59:59. Ex - 2018-06-28 18:05:00

  • TIMESTAMP - Timestamp between midnight, January 1st, 1970 and sometime in 2037. The main difference between DATETIME and TIMESTAMP is that DATETIME is constant while TIMESTAMP is affected by the time_zone setting.

  • TIME - Time in an HH:MM:SS format

  • YEAR(M) - Year in 2 or 4 digit format. M -> 2 -> YEAR between 1970 and 2069. M -> 4 -> YEAR between 1901 and 2155.


No hints are availble for this assesment

Answer is not availble for this assesment

Loading comments...