If a date-time value is the operand of addition, the other operand must be a duration. The rules for subtracting are different because a date-time value cannot be subtracted from a duration, and subtracting two date-time values differs from subtracting a duration from a date-time value. The rules for date-time arithmetic are shown in the following table.
If one operand is a... | ...the other operand must be a... |
---|---|
Date |
|
Time |
|
Timestamp |
|
If the FIRST operand is a... | ...the SECOND operand must be a... |
---|---|
Date |
|
Time |
|
Timestamp |
|
If the SECOND operand is a... | ...the FIRST operand must be a... |
---|---|
Date |
|
Time |
|
Timestamp |
|
More: