3

How to convert negative integer to positive integer using vb.net ? Also if there is a function in SQL Server 2008 to do the same concept ?

1
  • Why have you changed the accepted answer months after the fact? Commented Feb 13, 2014 at 23:30

3 Answers 3

13

In .NET, use Math.Abs()

In TSQL, use ABS()

Sign up to request clarification or add additional context in comments.

Comments

8

Regardless of the language you're programming in. You can multiply any number by -1 to change the number's sign.

-5 * -1 = 5
5 * -1 = -5

Comments

4

Abs() in SQL Server and Math.Abs() in VB.NET

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.