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.
- [+] Digg: Feature this article
- [+] Del.icio.us: Bookmark this article
- [+] Furl: Bookmark this article