T
tshad
I need to convert a number I get from my Sql table (where the value is a
string) to a string and have it be a precision of 2 and I want to reverse
the sign.
I originally used:
String.Format({0:c},dr["Amount"])
but then I needed to reverse the sign. The problem is that if the value is
negative, I get the value with a "()" around it, such that "-15.00", becomes
(15.00). I got an error when I tried to set it to negative.
So I tried:
String.Format({0:#.##),dr["Amount"])
But that would take a value of 15.35 and make a value of 15.3500. I thought
the #.## would make it double precision, but it doesn't.
How do I handle this?
Thanks,
Tom
string) to a string and have it be a precision of 2 and I want to reverse
the sign.
I originally used:
String.Format({0:c},dr["Amount"])
but then I needed to reverse the sign. The problem is that if the value is
negative, I get the value with a "()" around it, such that "-15.00", becomes
(15.00). I got an error when I tried to set it to negative.
So I tried:
String.Format({0:#.##),dr["Amount"])
But that would take a value of 15.35 and make a value of 15.3500. I thought
the #.## would make it double precision, but it doesn't.
How do I handle this?
Thanks,
Tom