Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To: ALways return a positive value
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01245031
Message ID:
01245032
Views:
15
This message has been marked as the solution to the initial question of the thread.
See ABS() function.

>In the statement below, this returns the correct value, which often is a negative number (almost always) which it should. But I want to bring it back as a positive value. Does SQL have a method to do that?
>
>
>
>cast(isnull(datediff(mi,meetings.PacuEnd,meetings.DischargeTime),0) as int) as DiffMinsPacuEnd_Dis
>
>
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform