Hi,
I want to show numeric values in a table cell, and I need to round it off to 2 decimal places.
I cannot use
because vbscript doesn't support it.Code:= Format$(TheNumber,"00.00")
Any ideas anyone?
DocZaf
{;->
Printable View
Hi,
I want to show numeric values in a table cell, and I need to round it off to 2 decimal places.
I cannot use
because vbscript doesn't support it.Code:= Format$(TheNumber,"00.00")
Any ideas anyone?
DocZaf
{;->
VBScript supports the Round function.
Code:?Round(TheNumber, 2)
Thanks Matthew and how about padding with zero's?
Zaf
{;->
What do you mean?
lo there,
maybe I can help, you cant use the format function but you can use FormatNumber
ie for what you want try:
FormatNumber(TheNumber, 2)
then you shouldn't need to worry about the padding with 0's.
hope that helps:)
Thanks Jeh, that should do it,
thanks everyone.
DocZaf
{;->