Avatar of rm103
rm103
Flag for United States of America asked on

Newbie - need to round field to 2 decimal places

Hello all:

Newbie trying to creating labels and trying to round field to 2 decimals. the below line yields the following result:

Output = this["QTY_TOPICK"].ToString();

When I print the label I get "60.00000". I need to reduce it to "60.00" and am unsure of how code this. I believe this is c#.

When you have a chance please advise.

Thanks,

Rm103
C#

Avatar of undefined
Last Comment
it_saige

8/22/2022 - Mon
Ryan Chong

try:
Output = this["QTY_TOPICK"].ToString("#,0.00");

Open in new window

rm103

ASKER
didn't work. I got the following error:

Cannot convert from 'string' to IE to 'System.IFormatProvider'
ASKER CERTIFIED SOLUTION
it_saige

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23