Accounting Style string format in ASP .NET

Posted by Russ Bradberry on Stack Overflow See other posts from Stack Overflow or by Russ Bradberry
Published on 2009-03-30T17:00:00Z Indexed on 2010/05/09 5:18 UTC
Read the original article Hit count: 494

Filed under:
|

I would like to know the easiest way to format a string as accounting style. I know how to format as currency using {0:c} but there are some differences in accounting style, for example, all the dollar signs will line up as well as all the decimal points, and negatives are expressed in parenthesis rather than with a "-" minus sign. You can find a good example of the way i would like it in excel if you format the cells as "accounting" with 2 decimal places.

thanks in advance, russ

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about string-formatting