home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.databases
- Path: sparky!uunet!dcatlas!joet
- From: joet@dcatlas.dot.gov (Joe Trott)
- Subject: Re: Currency fields and Rounding...Paradox 4.0
- Message-ID: <1993Jan4.153258.12585@dcatlas.dot.gov>
- Organization: U.S Dept. of Transportation
- References: <C059C2.Hxu@ccu.umanitoba.ca>
- Date: Mon, 4 Jan 1993 15:32:58 GMT
- Lines: 17
-
- umnoor@ccu.umanitoba.ca (Nasir Ahmed Noor) writes:
-
-
-
- >There is an amount whose 5% comes to be $146.505. I use Round(146.505 ,2) on
- >it and get $146.50. But I want it to round UP to $146.51 as all the people
- >sending in the payments round UP and my app. and there payment forms are always
- >off by 1 cent. How to fix it.
-
- You can write your own rounding function, e.g. add 0.005 to the number and
- then truncate it (multiply*100, use INT, then divide/100).
- This will solve the problem of the number's internal value as well.
-
- [description of internal value problem deleted]
-
- -JTT
-
-