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 |
|
jafrywilson
Constraint Violating Yak Guru
379 Posts |
Posted - 2010-10-06 : 05:00:38
|
| Hi all..How to find the difference of two dates in sql.. |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-10-06 : 05:13:37
|
| Using datediff functionHave a look at:http://msdn.microsoft.com/en-us/library/ms189794.aspx |
 |
|
|
jafrywilson
Constraint Violating Yak Guru
379 Posts |
Posted - 2010-10-06 : 06:00:51
|
| Tnx for the response ..Got some ideas and solved my problem |
 |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-10-06 : 06:04:51
|
Welcome |
 |
|
|
jafrywilson
Constraint Violating Yak Guru
379 Posts |
Posted - 2010-10-06 : 06:06:24
|
| DATEDIFF(datepart,startdate,enddate) This is the syntax for calculating date difference |
 |
|
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-10-06 : 06:14:48
|
quote: Originally posted by jafrywilson DATEDIFF(datepart,startdate,enddate) This is the syntax for calculating date difference
Yes |
 |
|
|
|
|
|