Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
jonasdavedomingo
Starting Member
33 Posts |
Posted - 2004-12-05 : 06:18:15
|
Lets say i want to get the difference of two dates:DATEDIFF(dd, system_date, st_TargetFinishDate) I want to make the difference an absolute value where it will become positive if the difference is negative.How will i do that? |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2004-12-05 : 06:39:54
|
| HiUse the ABS function.ABS( DATEDIFF(dd, system_date, st_TargetFinishDate) )There is more detail in BOL if you look up ABS.Hope that helpsDamian |
 |
|
|
jonasdavedomingo
Starting Member
33 Posts |
Posted - 2004-12-05 : 10:48:56
|
quote: Originally posted by Merkin HiUse the ABS function.ABS( DATEDIFF(dd, system_date, st_TargetFinishDate) )There is more detail in BOL if you look up ABS.Hope that helpsDamian
it works. thanks!!! |
 |
|
|
|
|
|