Queennie L
asked on
Convert negative output in 2010 VB.net
I am trying to import using 2010 VB.net and SQL 2008 R2 to text file but for a negative numbers it defaults to positive as an output when imported.
I have been trying to search but no luck.
2010 VB.net:
Example:
SQL Table column is
Total Price:
-105.10(Negative)
Text file:
It displays as output is
105.10(Positive)
Any help is much appreciated.
Thank you.
I have been trying to search but no luck.
2010 VB.net:
lsTotalPrice = CStr(System.Math.Abs((System.Math.Round(lnTotalPrice, 2))))
Example:
SQL Table column is
Total Price:
-105.10(Negative)
Text file:
It displays as output is
105.10(Positive)
Any help is much appreciated.
Thank you.
ASKER
There is an error when I remove the ABS.
It says "Identifier expected".
Thank you.
It says "Identifier expected".
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It's still not working.
In what way is it not working? The "Identifier expected" problem should be resolved...
Try this
lsTotalPrice=CStr( (System.Math.Round(lnTotal Price, 2)))
lsTotalPrice=CStr( (System.Math.Round(lnTotal
ASKER
@Paulmacd:
You are right. It was my end.
Thank you for your help.
You are right. It was my end.
Thank you for your help.
Happy to help. Thanks for the points!
lsTotalPrice = CStr(System.Math.(System.M