The DATE data type is used to store date and time information. This section describes the rules for comparing date data.
OceanBase Database supports storing the following information in each DATE value: year, month, day, hour, minute, and second. It does not store timezone information.
The rules for comparing date data are as follows:
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 the time in the morning. For example, the date and time value of 3:30 PM on February 2, 2019 is greater than the date and time value of 10:30 AM on February 2, 2019.
The time in the morning is greater than the time yesterday. For example, the date and time value of 2:30 AM on March 5, 2019 is greater than the date and time value of 11:30 PM on March 4, 2019.
