-
Re: Formatting numbers for output
"mike viglianco" <michael.viglianco@bankofamerica.com> wrote:
>
>How would you format a number to display with leading zeros?
>For example: 19 as 0000019.
>
>I have done this in many languages but cant seem to find out how in VBScript.
>
>Thanks,
>Mike Viglianco
I'm looking for the same format. Is there a way to do it in JavaScript or
ASP?
-
Re: Formatting numbers for output
I don't know that is there is anything 'built in', but you can spin your own
generic string 'padder'....
Function PadLeft(strIn, padChar, strLen)
PadLeft = Right(String(strLen, padChar) & strIn, strLen)
End Function
Response.Write PadLeft(19, "0", 8)
Response.End
"ID" <ismael.dehoyos@crystaldecisions.com> wrote in message
news:3b0a83fc$1@news.devx.com...
>
> "mike viglianco" <michael.viglianco@bankofamerica.com> wrote:
> >
> >How would you format a number to display with leading zeros?
> >For example: 19 as 0000019.
> >
> >I have done this in many languages but cant seem to find out how in
VBScript.
> >
> >Thanks,
> >Mike Viglianco
>
> I'm looking for the same format. Is there a way to do it in JavaScript or
> ASP?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks