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 |
|
challapavan
Starting Member
8 Posts |
Posted - 2007-10-23 : 14:39:05
|
| I have 2 datatime columns....i want to get the difference in the dates...EXampleStartdate Enddate Difference10/10/2007 20/10/200711/10/2007 21/10/2007 12/10/2007 22/10/200713/10/2007 23/10/200714/10/2007 25/10/2007I want the difference to be in the Difference column...Kindly help me...thanks in advance...pavan |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-10-23 : 14:42:42
|
| Use the DATEDIFF function.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
|
|
kiruthika
Yak Posting Veteran
67 Posts |
Posted - 2007-10-24 : 05:16:25
|
| Hi! select datediff(day,startdate,enddate) from mytableHappy Programming! |
 |
|
|
|
|
|