DateTimeOffset add Duration results in a DateTimeOffset Duration add Duration results in a Duration Date add Duration results in a DateTimeOffset Subtraction The sub operator subtracts the right numeric operand from the left numeric operand. The sub operator is also valid for the following time-related operands: DateTimeOffset sub Duration results in a DateTimeOffset Duration sub Duration results in a Duration DateTimeOffset sub DateTimeOffset results in a Duration Date sub Duration results in a DateTimeOffset Date sub Date results in a Duration Negation The negation operator, represented by a minus (-) sign, changes the sign of its numeric or Duration operand. Multiplication The mul operator multiplies the left and right numeric operands. Division The div operator divides the left numeric operand by the right numeric operand. If the right operand is zero and the left operand is neither of type Edm.Single nor Edm.Double, the request fails. If the left operand is of type Edm.Single or Edm.Double, then positive div zero returns INF, negative div zero returns -INF, and zero div zero returns NaN. Modulo The mod operator returns the remainder when the left integral operand is divided by the right integral operand. If the right operand is negative, the sign of the result is the same as the sign of the left operand. If the right operand is zero, the request fails. Arithmetic Operator Examples The following examples illustrate the use and semantics of each of the Arithmetic operators. Example : all products with a Price of 2.55: http://host/service/Products?$filter=Price add 2.45 eq 5.00 Example : all products with a Price of 2.55: sub 0.55 eq 2.00 Example : all products with a Price of 2.55: mul 2.0 eq 5.10 Example : all products with a Price of 2.55: http://host/service/Products?$filter=Price div 2.55 eq 1
DateTimeOffset add Duration results in a DateTimeOffset Duration add Duration results in a Duration Date add Duration results in a DateTimeOffset Subtraction The sub operator subtracts the right numeric operand from the left numeric operand. The sub operator is also valid for the following time-related operands: DateTimeOffset sub Duration results in a DateTimeOffset Duration sub Duration results in a Duration DateTimeOffset sub DateTimeOffset results in a Duration Date sub Duration results in a DateTimeOffset Date sub Date results in a Duration Negation The negation operator, represented by a minus (-) sign, changes the sign of its numeric or Duration operand. Multiplication The mul operator multiplies the left and right numeric operands. Division The div operator divides the left numeric operand by the right numeric operand. If the right operand is zero and the left operand is neither of type Edm.Single nor Edm.Double, the request fails. If the left operand is of type Edm.Single or Edm.Double, then positive div zero returns INF, negative div zero returns -INF, and zero div zero returns NaN. Modulo The mod operator returns the remainder when the left integral operand is divided by the right integral operand. If the right operand is negative, the sign of the result is the same as the sign of the left operand. If the right operand is zero, the request fails. Arithmetic Operator Examples The following examples illustrate the use and semantics of each of the Arithmetic operators. Example : all products with a Price of 2.55: http://host/service/Products?$filter=Price add 2.45 eq 5.00 Example : all products with a Price of 2.55: sub 0.55 eq 2.00 Example : all products with a Price of 2.55: mul 2.0 eq 5.10 Example : all products with a Price of 2.55: http://host/service/Products?$filter=Price div 2.55 eq 1