devxlogo

Strip Leading Zeros in ASP Output

Strip Leading Zeros in ASP Output

Question:
How do I strip off leading zeros from data displayed from an ASP page?

Answer:
Use the FormatNumber function.
If value = “0000046” Then FormatNumber(value,0) will result in 46. FormatNumber(value,2) will result in 46.00

devx-admin

Share the Post: