<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Is there a long method operation for modulo if mod or % is not a supported function/operator? in Digital Exchange</title>
    <link>https://community.blueprism.com/t5/Digital-Exchange/Is-there-a-long-method-operation-for-modulo-if-mod-or-is-not-a/m-p/58666#M1685</link>
    <description>&lt;P&gt;This is related to the Zeller's Congruence algorithm where there is a requirement to use Modulo to get the actual day of an input date. However, in the software I'm using which is Blueprism, there is no modulo operator/function that is available and I can't get the result I would hope to get. &lt;/P&gt;

&lt;P&gt;In some coding language (Python, C#, Java), Zeller's congruence formula were provided because mod is available. &lt;/P&gt;

&lt;P&gt;Would anyone know a long method of combine arithmetic operation to get the mod result?&lt;/P&gt;

&lt;P&gt;From what I've read, mod is the remainder result from two numbers. But 
181 mod 7 = 6 and 181 divided by 7 = 25.857.. the remainder result are different.&lt;/P&gt;

--------------------------------------------------&lt;BR /&gt;

&lt;B&gt;Disclaimer:&lt;/B&gt; This content was auto-posted from Stackoverflow. The original Stackoverflow question is here &lt;A href="https://stackoverflow.com/questions/57715698/is-there-a-long-method-operation-for-modulo-if-mod-or-is-not-a-supported-funct"&gt;Stackoverflow Post&lt;/A&gt;, posted by &lt;A href="https://stackoverflow.com/users/11545946/erlomboy"&gt;erlomboy&lt;/A&gt;.</description>
    <pubDate>Thu, 29 Aug 2019 20:01:00 GMT</pubDate>
    <dc:creator>Digital_WorkerB</dc:creator>
    <dc:date>2019-08-29T20:01:00Z</dc:date>
    <item>
      <title>Is there a long method operation for modulo if mod or % is not a supported function/operator?</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Is-there-a-long-method-operation-for-modulo-if-mod-or-is-not-a/m-p/58666#M1685</link>
      <description>&lt;P&gt;This is related to the Zeller's Congruence algorithm where there is a requirement to use Modulo to get the actual day of an input date. However, in the software I'm using which is Blueprism, there is no modulo operator/function that is available and I can't get the result I would hope to get. &lt;/P&gt;

&lt;P&gt;In some coding language (Python, C#, Java), Zeller's congruence formula were provided because mod is available. &lt;/P&gt;

&lt;P&gt;Would anyone know a long method of combine arithmetic operation to get the mod result?&lt;/P&gt;

&lt;P&gt;From what I've read, mod is the remainder result from two numbers. But 
181 mod 7 = 6 and 181 divided by 7 = 25.857.. the remainder result are different.&lt;/P&gt;

--------------------------------------------------&lt;BR /&gt;

&lt;B&gt;Disclaimer:&lt;/B&gt; This content was auto-posted from Stackoverflow. The original Stackoverflow question is here &lt;A href="https://stackoverflow.com/questions/57715698/is-there-a-long-method-operation-for-modulo-if-mod-or-is-not-a-supported-funct"&gt;Stackoverflow Post&lt;/A&gt;, posted by &lt;A href="https://stackoverflow.com/users/11545946/erlomboy"&gt;erlomboy&lt;/A&gt;.</description>
      <pubDate>Thu, 29 Aug 2019 20:01:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Is-there-a-long-method-operation-for-modulo-if-mod-or-is-not-a/m-p/58666#M1685</guid>
      <dc:creator>Digital_WorkerB</dc:creator>
      <dc:date>2019-08-29T20:01:00Z</dc:date>
    </item>
    <item>
      <title>RE: Is there a long method operation for modulo if mod or % is not a supported function/operator?</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Is-there-a-long-method-operation-for-modulo-if-mod-or-is-not-a/m-p/58667#M1686</link>
      <description>There are a couple of ways to execute a Modulo calculation within Blue Prism, either with a Calculation Stage or a Code Stage.&lt;BR /&gt;&lt;BR /&gt;With a &lt;STRONG&gt;Calculation Stage&lt;/STRONG&gt;, you are correct, you have to use a long form expression instead. That can be achieved with the following formula.&lt;BR /&gt;
&lt;UL&gt;
&lt;LI&gt;For example, &lt;STRONG&gt;27 % 5 = 2&lt;/STRONG&gt;, where 27 is the &lt;EM&gt;dividend&lt;/EM&gt; and 5 is the &lt;EM&gt;divisor&lt;/EM&gt;.&lt;/LI&gt;
&lt;LI&gt;To achieve that in a Calculation stage:&amp;nbsp;&lt;STRONG&gt;[dividend] - ((RndDn([dividend]/[divisor]))*[divisor])&lt;/STRONG&gt;&lt;/LI&gt;
&lt;/UL&gt;
With a &lt;STRONG&gt;Code Stage&lt;/STRONG&gt;, you have C# and Visual Basic available to you, which means the Mod operator is available. You could either run your entire formula within a code stage, or just execute the Mod piece of the formula.&lt;BR /&gt;&lt;BR /&gt;Cheers.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Charles Kovacs&lt;BR /&gt;Developer Consultant&lt;BR /&gt;Blue Prism&lt;BR /&gt;America/Chicago&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 18 Sep 2019 16:41:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Is-there-a-long-method-operation-for-modulo-if-mod-or-is-not-a/m-p/58667#M1686</guid>
      <dc:creator>charliekovacs</dc:creator>
      <dc:date>2019-09-18T16:41:00Z</dc:date>
    </item>
    <item>
      <title>RE: Is there a long method operation for modulo if mod or % is not a supported function/operator?</title>
      <link>https://community.blueprism.com/t5/Digital-Exchange/Is-there-a-long-method-operation-for-modulo-if-mod-or-is-not-a/m-p/58668#M1687</link>
      <description>Very soon, we will have a Utility Maths library available in the Digital Exchange (DX) this will be a free extension and will provide complimentary mathematics support to Blue Prism.&lt;BR /&gt;&lt;BR /&gt;Please watch the Digital Exchange for more details over the coming week.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Geoff Hirst&lt;BR /&gt;Partner Pre Sales&lt;BR /&gt;Blue Prism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Sep 2019 05:55:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Digital-Exchange/Is-there-a-long-method-operation-for-modulo-if-mod-or-is-not-a/m-p/58668#M1687</guid>
      <dc:creator>GeoffHirst</dc:creator>
      <dc:date>2019-09-19T05:55:00Z</dc:date>
    </item>
  </channel>
</rss>

