is it possible to convert 09 to 9 by any function?if yes,please tell me.It is required to me.Thank you.

Recommended Answers

All 3 Replies

Sure! Easiest way to convert a string into a number is just to add 0 to it!
So: 09+0=9.
I do this all the time when I know I have a string that is actually a number and want to use it as such. This also works in perl, too!
But you must be cartain that this will always be a numeric string, or errors will result.

It is working.Thank you for your response.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.