Duration Modeling and Calculations
Data and time values represent the finest processing precision and do not reflect any duration; just one point in time is referenced. Using the DATE
data type, a granularity of up to one second can be used. Based on the definition, the granularity precision can be of the order of nanoseconds when dealing with TIMESTAMP
. Oracle does not provide a specific data type for dealing with date elements with no time element. Therefore, the meaning of the DATE
data type value depends on precision, and time elements do not need to be taken into account. Typically, an employment contract is in days rather than hours. Consequently, dealing with more precise granularity frames, such as hours, minutes, or even seconds, is unnecessary. But they always need to be stored in the DATE
value.
Similarly, an invoice due date is a day, the time is not essential. When we look at energy payments, they are usually made once a month, so we can use monthly granularity. Thus...