Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Formatting numeric strings
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00873944
Message ID:
00874032
Vues:
20
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform