Solved

WAY URGENT:  absolute value

Posted on 2004-09-09
1
198 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

895 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

11 Experts available now in Live!

Get 1:1 Help Now