Try this:
decimal d = 123.4567m;
d.ToString("0.00");
or
Math.Round(d, 2).ToString();
or
String.Format("{0:0.00}", d)
--
Sergey Bogdanov
http://www.sergeybogdanov.com
JamesL wrote:
> Kind of a silly little one for me to be stumped on but:
>
> I do some math on some values that represent money. The math may result in
> several decimal places but since it is money I only want to display 2
> decimal places on the screen and store 2 decimal places in my text file.
> How do I limit the value to 2 decimal places.
>
> This is usually pretty simple but I am stumped. Am I overlooking the
> obvious on this one?
>
> James Lysaght
>
>