C
Chris Hohmann
Bob Barrows said:newstring = right("000000000" & i,9)
newstring = Right("0000000" & i,8)
;-p
Bob Barrows said:newstring = right("000000000" & i,9)
Ray at said:I'd put it in a function.
Function PadInt(iNum, iPadLength)
PadInt = Right(String(iPadLength, "0") & Cstr(iNum), iPadLength)
End Function
Response.write PadInt(34234, 8)
bart said:Hi,
I have a counter i
Now I want to derive a fixed lenght string from this counter :
1 -> "00000001"
52 -> "00000052"
12896 -> "00012896"
What is the fastest way to do this?
This is part of a recursive subroutine, so the command will be
executed quite a lot.
Any suggestions?
tia
bartp
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.