Format Number 
Author Message
 Format Number

Hello all .. this is probably an easy on for someone ..

I am trying to use VBScript to add a comma to a value returned from a
database.

Initially I used the Response.Write ("ct") method to insert the value of the
"ct" variable, but this left out the comma after the value exceeded 1,000.

Upon doing some research on MS's website I found out how to use the
FormatNumber function  ...

Using  Response.Write FormatNumber(rs("ct")) now adds the comma, but also
returns values to the right of the decimal, example 3,700 is shown as
3,700.00.

I know that the NumDigitsAfterDecimal option will eliminate this, but I
can't figure out how to use this option.  I keep getting incorrect syntax
messages.

I'm sure that this is probably a simple one for someone in this newsgroup
and I would sure appreciate any help.

Thanks in advance,

Bill Kellaway



Sun, 09 Sep 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. from Microsoft format Number to IEE format Number

2. Format Number

3. Format Number Fields

4. formatting numbers for check writing

5. Help formatting numbers

6. Format numbers???????

7. Macro to format numbers

8. Please How to format Number to text

9. Format numbers example 1.500,-

10. Formatting number style

11. Format Numbers in Table Cells

12. Format numbers in code

 

 
Powered by phpBB® Forum Software