Was this helpful?
Arithmetic Operators
Numeric expressions can be combined arithmetically to produce other (compound) expressions. The following arithmetic operators are supported (in descending order of precedence):
Operator
Description
+, -
plus, minus (unary)
**
exponentiation
*, /
multiplication, division
+, -
addition, subtraction (binary)
Unary operators group from right to left, while binary operators group from left to right. You can force the order of precedence of operations using parentheses. For example, the following is an expression with no ambiguity as to precedence of operations.
(salary + 1000) * 12
Some arithmetic operations on date expressions are available:
Date Addition:
interval + interval —> interval
interval + absolute —> absolute
Date Subtraction:
interval - interval —> interval
absolute - absolute —> interval
absolute - interval —> absolute
Report-Writer does not support multiplication or division of date values. For example, suppose birthdate is an absolute date column in the data table. The following constructs give tomorrow's date and the age of the person with that birthdate, respectively:
current_date + date('1 days')
current_date - birthdate
Last modified date: 11/09/2022