Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Problems with MOD function in V6

Featured Replies

Until I convert to 8.5, I must complete an important project using Version 6.0. I need to calculate biweekly pay dates for employee contracts for a 3 month period, with 1st pay date being the next date in the biweekly cycle after their contract date and "Base Date" is the 1st pay date of the year. I figured that if I use Mod(Contract Date - Base Date, 14) and add that to their Contract date, I would have the 1st Pay date for that employee. I tested the math in Excel and got it to work. I found a problem in Filemaker (V6). The MOD and INT functions give different results from Excel. (Ver 8.5 is fine). FM6: Int(-3.4)=-3, Excel & V8.5: Int(-3.4)=-4. Also, FM6: Mod(48,14)=6, Excel & FM8.5: Mod(48,14)=8. Any workarounds / Suggestions?

For me I get on FM8.5

Int(-3.4)=-3

Mod(48; 14)=6

The behavior of the Mod() function has been changed in Filemaker version 7. This change affects only results of negative numbers input. As John says, Mod ( 48 ; 14 ) returns 6 in ANY version.

However, Mod ( -48 ; 14 ) returns 8 in version 7 and higher, instead of -6 in previous versions.

To get the same behavior in version 6 as in later versions, you can use:

Mod( number , divisor )

+

Case( 

Mod( number , divisor ) and ( number < 0 xor divisor < 0 ) ,

divisor

)

I don't know of any changes regarding the Int() functions. AFAIK, Int ( -3.4 ) = -3 in ALL versions.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.