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
Title:
Formatting numeric strings
Miscellaneous
Thread ID:
00873944
Message ID:
00873944
Views:
47
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
Matthew Kennedy
Decision Support Technology Inc.

"I try to take one day at a time, but sometimes several days attack me all at once." ~ Ashleigh Brilliant

New Jersey Dot Net User Group
Next
Reply
Map
View

Click here to load this message in the networking platform