EdgeQL Tutorial

Operators

Subtopics

Date and time types support the addition or subtraction of various durations. Note that this operation produces the result of the same type as the other operand:

Input
Run
Output Objects
Press the 'Run' button to evaluate the input
Input
Run
Output Objects
Press the 'Run' button to evaluate the input
Input
Run
Output Objects
Press the 'Run' button to evaluate the input
Input
Run
Output Objects
Press the 'Run' button to evaluate the input

Of course, durations can be added and subtracted from each other:

Input
Run
Output Objects
Press the 'Run' button to evaluate the input

Finally, it's possible to subtract one datetime value from another to get a duration, but this operation is illegal for any of the cal types:

Input
Run
Output Objects
Press the 'Run' button to evaluate the input
Input
Run
Output Objects
Press the 'Run' button to evaluate the input