The DATE - DATE expression is not processed as a simple subtraction, but rather as explained in the following process:
- The encoded date values are converted to intermediate values which are each the number of days since a system-defined fixed date.
- The second of these values is then subtracted from the first, giving the number of days between the two dates.
- The result is returned as if it were in the ANSI SQL:2011 form INTERVAL DAY, though the value itself is an integer.
Other arithmetic operations on date values may provide results, but those results are not meaningful.