MOD function: Difference between revisions
From Planfix
(Created page with "{{#seo: |title=MOD Function |titlemode=append |keywords=planfix, function, MOD function, reports, MOD |description=ROUND function }} The function returns the remainder of the argument "number" divided by the value of the argument "divisor". The result has the same sign as the divisor. == Format == '''MOD(number; divisor)''' == Examples == {| class="wikitable" |- ! style="font-weight: bold" | Formula ! style="font-weight: bold" | Description ! style="font-weight: bold"...") |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 34: | Line 34: | ||
<pre>MOD(<nowiki>{{Task.Worked TO}}-{{Task.Got hired}}</nowiki>;5)</pre> | <pre>MOD(<nowiki>{{Task.Worked TO}}-{{Task.Got hired}}</nowiki>;5)</pre> | ||
We divide by 5 to find the date of the employee's anniversary in the company. If the employee has a working anniversary in the company, we get 0 as an answer. | We divide by 5 to find the date of the employee's anniversary in the company. If the employee has a working anniversary in the company, we get 0 as an answer. | ||
Line 41: | Line 40: | ||
== Go To == | == Go To == | ||
*[[Standard functions| | *[[Standard functions | Standard operators and Planfix functions]] | ||
*[[Calculated fields]] | *[[Calculated fields]] | ||
*[[Reports]] | *[[Reports]] |
Latest revision as of 14:16, 15 February 2024
The function returns the remainder of the argument "number" divided by the value of the argument "divisor". The result has the same sign as the divisor.
Format
MOD(number; divisor)
Examples
Formula | Description | Result |
---|---|---|
MOD(3; 2) | Remainder of 3/2 division | 1 |
MOD(-3; 2) | Remainder of -3/2 division. The sign is the same as the divisor. | 1 |
MOD(3; -2) | Remainder of 3/-2 division. The sign is the same as the divisor. | -1 |
MOD({{Task.Worked TO}}-{{Task.Got hired}};5)
We divide by 5 to find the date of the employee's anniversary in the company. If the employee has a working anniversary in the company, we get 0 as an answer.