All Products
Search
Document Center

Date values

Last Updated: Jun 18, 2021

The DATE data type stores date and time information. Each DATE value in ApsaraDB for OceanBase stores the following information: year, month, day, hour, minute, and second, but the value does not contain time zone information.

The following list provides the comparison rules for date data:

  • The current time is greater than the past time. For example, the date value of May 1, 2018 is greater than the date value of May 1, 2012.

  • The time in the afternoon is greater than that in the morning. For example, the date and time value of 15:30:00 on February 2, 2019 is greater than the date and time value of 10:30:00 on February 2, 2019.

  • The time in the morning is greater than the time of the previous day. For example, the date and time value of 02:30:00 on March 5, 2019 is greater than the date and time value of 23:30:00 on March 4, 2019.