Returns the remainder after a number is divided by a divisor.
Mod ( number ; divisor )
number
- any numeric expression or field containing a numeric expression
divisor
- numeric expression or field containing a numeric expression
number
FileMaker Pro 6.0 or earlier
Use the Mod function when converting units of measure, such as from minutes to hours, to return the number of remaining units.
Calculates 210 divided by 4, with a remainder of 2.
Mod ( 210 ; 4 )
returns 2.
Converts the hours portion of a time from 24-hour notation to 12-hour notation. When the 24hTime field contains 16:
Mod ( 24hTime ; 12 )
returns 4.
Converts a number of months into a number of years and remaining months. When the NumberOfMonths field contains 31:
Int ( NumberOfMonths / 12 ) & " years, " & Mod ( NumberOfMonths ; 12 ) & " months"
returns 2 years, 7 months.