The DATE data type stores date and time information. This topic describes the rules for comparing date values.
Each DATE value in OceanBase Database can contain the following information: year, month, day, hour, minute, and second, but does not contain the time zone information.
Rules for comparing date values are as follows:
The current time is greater than the past time. For example, the date equivalent of 1-MAY-2018 is greater than that of 1-MAY-2012.
The time in the afternoon on the same day is greater than the time in the morning. For example, the datetime equivalent of 2-FEB-2019 3:30 p.m. is greater than that of 2-FEB-2019 10:30 a.m.
The morning time is greater than any time in the previous day. For example, a datetime equivalent of 5-MAR-2019 2:30 a.m. is greater than that of 4-MAR-2019 23:30 p.m.