Discussion
4
Replies
4888
Views
Posted: July 15, 2015
Last activity: August 30, 2015
Closed
Remove leading zeros from an integer
Hi,
I have an integer. say an account number which I am getting from DB as 000000000XXXXXXXX. Requirement is to remove all the leading zero's from the value and then display it on the screen. Do we have any function to achieve that?
Note: We cannot use substring function because we are not sure how many leading zero's will be present for that value(means number of zero's are not fixed)
Thanks
Try using the function - "@toInt". this converts a string to integer. The leading zeros should be truncated automatically.