I am new to ASP. I was wonder is there a command to convert the text format number to 2 digit number.
Ex: 5258 need to show 52.60
Right now id am doing like this:
<%=fh4a/100%>
Is there a better and beter way to format the number.
Hi,
google and site seach will give you many results, but as i see you want the number 5258 (or rather 5,258) to be 52.58 ... Perhaps you should keep your way (divide by 100) and then do a simple rounding (?)
There are a few another ways that you could use but, for a good answer, it also depends on exactly how the original string will look. For example,
1) Will it always be 4 digits long (e.g could the number ever be as high as 15258 or as low as 525?)?
2) Is the precision of the number always going to be in the same place (e.g. could 5258 aver be 525.8 or will it always be 52.60)
3) Do you want to round to the nearest whold number (e.g. would 5254 become 52.50?)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.