MOD function: Difference between revisions
From Planfix
No edit summary |
No edit summary |
||
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. |
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.