converting a number to 2 decimal places [message #21193] |
Wed, 17 July 2002 13:21 |
Tracy
Messages: 43 Registered: January 2000
|
Member |
|
|
Can you tell me how to convert a whole number to 2 decimal places? For example, a value of 1 cent is stored in the database as 1. I need to take 1 and convert it to 0.01
thanks,
Tracy
|
|
|
Re: converting a number to 2 decimal places [message #21194 is a reply to message #21193] |
Wed, 17 July 2002 13:27 |
Tracy
Messages: 43 Registered: January 2000
|
Member |
|
|
P.S. Dividing by zero works fine for the number 1. However, if I have the number 2200, I want to display 22.00, not just 22. In the latter case, division by 100 doesn't work perfectly as it drops off any zeros after the decimal point.
|
|
|
|
|