Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

This topic is 6523 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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?

Posted

For me I get on FM8.5

Int(-3.4)=-3

Mod(48; 14)=6

Posted

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.

This topic is 6523 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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