that was my solution (other then I subract .005 for mine because I was rounding down) ----- Original Message ----- From: Doug Hamilton To: RBASE-L Mailing List Sent: Wednesday, December 03, 2008 7:57 PM Subject: [RBASE-L] - Re: rounding tax amounts UP
Add .0005 and round? 3.4567 + .0005 = 3.4572, rounds to 3.457 3.4561 + .0005 = 3.4566, rounds to 3.457 Doug Tom Frederick wrote: This issue fits our situation just the opposite way. Under a special certificate from US Dept of Labor wage and hour rules, we have to round all salary figures up as long as the last digit is not 0. Regular rounding: 3.4567=3.457 follows the expected process and is pretty easy. DOL rounding: 3.4561=3.457 because the fourth decimal digit is not 0, the third decimal digit must move up to the next higher number. Moving down can result in significant legal wage issues. How to get BRND or something else to do this? Tom Frederick Elm City Center 1314 W Walnut Jacksonville, IL 62650 Off - 217-245-9504 Fax - 217-245-2350 Email - [EMAIL PROTECTED] Web - www.elmcity.org -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Dennis McGrath Sent: Wednesday, December 03, 2008 1:16 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: rounding tax amounts down... Atually, just assigning a calculation to a currency will automatically round down Set var vDouble double = 1.495 Set var vCurr Curr = .vDouble Vcurr will now contain 1.49 Dennis McGrath -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Lawrence Lustig Sent: Wednesday, December 03, 2008 1:06 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: rounding tax amounts down... << I had looked at that but when I did... SET VAR testing currency = (BRND(1.495,8,.01)) testing = 1.50 not 1.49, I must be missing something... The function INT truncates as you want, the trick is to multiply, then divide by 100: SET VAR vRounded = (INT(.vOriginal * 100) / 100) or consider using NUMERIC. -- Larry

