Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 10 JUN 2005 03:14:52PM David Mayes wrote:

I am having trouble with decimals. This is running on website using the internet gateway. My program is going to have to calculate tax for the first time. I use my program to sell a product and the price of that product is calcuated which has never been a problem because it was all whole numbers. But with sales tax now i have to deal with decimals. Now with tax if the price comes to $1250.50 it shows 1250.5, i can correct this with OConv using MD2 but then on whole prices like $1175 it shows 11.75. And i have not run into it yet but i am sure that in some cases i will get a number like 1250.725. I need this to display properly in dollars and cents for all of the possible outcomes. Can anyone help me with this?


At 10 JUN 2005 07:22PM Richard Hunt wrote:

David,

Try this…

NUMBER=1250.5

NUMBER=OCONV(ICONV(NUMBER,'MD2'),'MD2,')

NUMBER=1175

NUMBER=OCONV(ICONV(NUMBER,'MD2'),'MD2,')


At 28 JUN 2005 09:25AM David Mayes wrote:

Thank You works great.


At 28 JUN 2005 09:26AM David Mayes wrote:

Thank you works great.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/71a930bf401388e58525701c0069bb39.txt
  • Last modified: 2023/12/28 07:39
  • by 127.0.0.1