AI & ML for Managers - Flat 70% OFF   Offer ends in

SQL Tutorial

18 / 59
   

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. Like DATETIME but no hyphens/spaces. Ex - 20180628180500

  • 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.