Solved

WAY URGENT:  absolute value

Posted on 2004-09-09
1
195 Views
Last Modified: 2012-05-05
case("Amount"):
                                                      strInstanceValue = "$" + formatLIB.FormatAsCurrency(strInstanceValue).ToString();
                                                      if(strInstanceValue == "$0")
                                                      {
                                                            strInstanceValue = "";
                                                      }                                                      
                                                      break;                                                


====================================

I need the code above changed so it displays absolute value.
0
Comment
Question by:knowlton
1 Comment
 
LVL 24

Accepted Solution

by:
Justin_W earned 500 total points
ID: 12019391
Use something like this:
   strInstanceValue = Math.Abs(Decimal.Parse(strInstanceValue)).ToString();
   strInstanceValue = "$" + formatLIB.FormatAsCurrency(strInstanceValue ).ToString();
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now