Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting numbers

Status
Not open for further replies.

SlykFX

Programmer
Oct 12, 2002
76
GB
Is there a way to format a number so that it shows commas in the appropriate location

the numbers will be coming from both a database and from user input and can range between anything from -infinite to +infinite
(the incredibly large/small numbers wont be coming from the db, but you get the idea)

basically what i want is to change 1000000 into 1,000,000 but must also work on any number passed to it

it doesnt matter if it needs to be done in javascript as it is only for page display, but i would prefere it to be done in VBScript

Thanks in advance

I can't be bothered to have a sig!
 
it sounds like your looking for the FormatNumber function, here is a link for it:

-Tarwn

01000111 01101111 01110100 00100000 01000011 01101111 01100110 01100110 01100101 01100101 00111111
minilogo.gif alt=tiernok.com
The never-completed website
 
thats perfect, thank loads :)

I can't be bothered to have a sig!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top