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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Number Format 1

Status
Not open for further replies.

Silvinho

Programmer
Jul 9, 2001
58
0
0
GB
Ive got an ASP script which displays a number string starting from 000 upwards. The problem im having is that 000 or 001 etc is always displayed as 0 or 1 without the 2 digits in front. Does anyone know how to overcome this problem?
 
do this
formatnumber( iNumber,,-1)

The formatnumber function has several optional parameters the secound is NumDigitsAfterDecimal setting it to -1 (true) should do the trick.

hth
 
a simple trick:
Right ("000" & CStr(number), 3)

PFR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top