The Divide function can be used to return the value of one number divided by the other number.
Use case: the Divide function can be used as an easy way to divide two numbers.
Syntax:
Divide(1,2)
1 = Number of the first value in division equation as the numerator
2 = Number of the second value the division equation as the denominator
Example:
%%[
set @numbervar1 = ‘207’
set @numbervar2 = ‘3’
]%%
%%=Divide(@numbervar1,@numbervar2)=%%
Output:
69
Explanation:
In the Divide example above, the two variables are hardcoded with the numbers ‘207’ as the numerator and ‘3’ as the denominator. Dividing 207 by 3 results in the number of 69 (nice!)
The Divide function can be used for whole numbers or decimals. The datatype for these values should be a number datatype or decimal or you can hardcode the numbers as it is shown in the example above.
Related functions are the Add, Multiply, and Subtract functions.