troubleshooting Question

Remove Leading Zeros From A Variable

Avatar of net-workx
net-workxFlag for United Kingdom of Great Britain and Northern Ireland asked on
DatabasesASP
10 Comments1 Solution1400 ViewsLast Modified:
I have a field being returned from a DB and i would like to know a simple way of (if there is one!) to removing all leading zeros from the figure.

The code at the minute is just:
Response.Write RSlinkstatus("CALLID")

And this produces a figure on the page such as:  00000000000001186512

I need this figure to be changed to 1186512.

Fixing the function to remove a specific amount of numbers from the front will not work as eventually the number will change to 8 characters long rather than seven.

Thanks,
Carl
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 10 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros