But the type of the value is different in each case, right?

Julian

> On Dec 10, 2024, at 20:11, Mihai Budiu <mbu...@gmail.com> wrote:
> 
> What is the semantics of subtracting two dates (times, timestamps)?
> The Calcite syntax is (d0 - d1) time_interval.
> But the following programs evaluate to the same value:
> 
> SELECT (DATE '2020-03-01' - DATE '2020-01-01') YEAR
> SELECT (DATE '2020-03-01' - DATE '2020-01-01') MONTH
> SELECT (DATE '2020-03-01' - DATE '2020-01-01') YEAR TO MONTH
> 
> Similar problems occur for subtracting TIME or TIMESTAMP values.
> 
> Mihai

Reply via email to