March 16, 200718 yr 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?
March 16, 200718 yr 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