extract decimals from an integer
{ Posted on 1/17/2010 11:25:00 AM
by Silvercode
}
Here number is 1.35
decno=mynumber.substring(mynumber.indexOf('.'), mynumber.length);
Use the substring function to extract from the "." till the length of the number field, which gives you the result :
.35
Happy coding...
decno=mynumber.substring(mynumber.indexOf('.'), mynumber.length);
Use the substring function to extract from the "." till the length of the number field, which gives you the result :
.35
Happy coding...
No Response to "extract decimals from an integer"
Post a Comment