Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Formatting numeric strings
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00873944
Message ID:
00874032
Views:
19
Mat,

Check out Cathi's reply to this question in message #670154.

~~Bonnie

>I am having trouble with the formatting of SQL results, my code looks something like this:
>
>mmDataSet ds = (mmDataSet)this.GetDataSet("SELECT " +
> "dollarAmt FROM myTable);
>
>this.dollarString = ds.Tables[0].Rows[0][0].ToString();
>
>This works fine, but if I try to change to:
>
>this.dollarString = ds.Tables[0].Rows[0][0].ToString("C");
>
>I get the error:
>
>No overload for method 'ToString' takes '1' arguments
>
>How do I format the numeric value in the DataSet to display in currency format?
>
>Kind Regards,
>
>Mat
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform