Format decimal to 2 decimal point

I tried to use format(decimalValue,”##,##0.00″) on a asp.net application but disappointed with the results it formulated. I thought it was the variable that used to store the result, but it seems that the problem lies in the aspx application as it worked fine on a windows application.

Scouting the net, found another build-in function which is much simpler, by calling inserting the format as parameter after calling tostring function, eg. decimalValue.tostring(“##,##0.00″).

It somehow worked this way. It still makes me wonder..

Written by admin on March 19th, 2010 with no comments.
Read more articles on Programming.

Related articles

No comments

There are still no comments on this article.

Leave your comment...

If you want to leave your comment on this article, simply fill out the next form:




You can use these XHTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> .