Data Transformation Engine Functions and Expressions Reference Guide
Chapter 3 - Function Reference MOD
Functions and Expressions Reference Guide
153
Uses
Use
MIN when you need the minimum value from a series of number, date,
time, or text values.
Related Function
MAX
MOD
The MOD function returns the modulus that remains after a number is divided by
an integer.
Syntax
MOD (single-number-expression , single-integer-expression)
Meaning
MOD (dividend , divisor)
Returns
This function returns a single-integer.
The result is the remainder (modulus) after dividend is divided by divisor. The
result has the same sign as divisor.
The dividend is first divided by the integer divisor, resulting in a quotient. The
modulus is calculated by multiplying the integer portion of the quotient by
divisor and then subtracting that product from dividend.
If divisor is 0, MOD returns NONE.
Examples
MOD (3 , 2) and MOD (-3, 2) return 1
MOD (3, -2) and MOD (-3, -2) return -1
MOD (-3, 2) and MOD (-3, -2) return 1
MOD (-3, -2) and MOD (-3, -2) return -1
Uses
Use
MOD when you need the modulus of an integer and a number.