The date/time data types : Date Type « Date Time « SQL / MySQL






The date/time data types

     


Data type         Format                             Range
DATE              YYYY-MM-DD                         1000-01-01 through 9999
TIME              HH:MM:SS                           -838:59:59 to 838:59:59
DATETIME          YYYY-MM-DD HH:MM:SS                1000-01-01 00:00:00 through 9999
YEAR              YYYY                               1901 to 2155 (and 0000)
TIMESTAMP         YYYY-MM-DD HH:MM:SS                1970-01-01 00:00:00 to partway through 2037

   
    
    
    
    
  








Related examples in the same category

1. Date and Time Sizes, Formats, and Ranges
2.Define and check the date data type
3.Define and use Date data type
4.Show current date
5.Use date data type
6.Defining Set Membership:Finding Records in a Set
7.Performing Range Tests 3
8.Performing Range Tests 1
9.Performing Range Tests 2
10.Convert Date to int
11.Date and Time Column Types
12.Date and Time Sizes, Formats, and Ranges