Modulo operator in Blue prism

erlomboy

New Member
Hello,

Is there a similar way to get a result from a Modulo operator in BP? I don't know how to code and just want to use the Process or Object studio for this.

For example, in what I've seen in Python or C# code, the operator for Modulo is %, but this is not available in Process/Object studio functions.

Usage: I'm looking to create an arithmetic operation for the Zeller's Congruence algorithm that calculates the actual day based on input date dd/mm/yyyy.

Thanks!!
 

gil.silva

Active Member
Hello erlomboy,

Blue Prism doesn't provide that operator by default, but you can use a workaround with a calculation which is the base of the modulo operator:

In a calculation stage use:
a - (RndDn(a/b, 0) * b)

Where a and b are your variables as in a % b.

The previous calculation does 3 operations:
q = RndDN(a /b, 0); //finding quotient (integer part only)
p = q * b; //finding product
m = a - p; //finding modulus
 
Top