🚀 Welcome to MDriven Learn –  Don’t miss the latest Release Notes.
OCLOperators div

The div operator performs division on two numeric values and returns only the integer part of the quotient. Unlike the standard division operator (/), which returns a Real or Decimal, div discards the remainder.

Syntax

number1.div(number2)

Example

Customer.allInstances->first.Age.div(20)

Returns the integer quotient of the first customer's age divided by 20, truncating any fractional remainder.