home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / database / 8787 < prev    next >
Encoding:
Text File  |  1993-01-04  |  915 b   |  28 lines

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