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 |
|
dew3it
Starting Member
14 Posts |
Posted - 2009-04-13 : 10:18:06
|
| HiI need to compare the date between column of two different table,however column is of DateTime but I need to compare only the Date part.Please advice.dev |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-04-13 : 10:26:33
|
| Where t1.datecol>=dateadd(day,datediff(day,0,t2.datecol),0) and t1.datecol<dateadd(day,datediff(day,0,t2.datecol),1)MadhivananFailing to plan is Planning to fail |
 |
|
|
dew3it
Starting Member
14 Posts |
Posted - 2009-04-13 : 10:55:37
|
| Thanks madhivanandev |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-04-15 : 02:46:02
|
quote: Originally posted by dew3it Thanks madhivanandev
You are welcome MadhivananFailing to plan is Planning to fail |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-04-15 : 02:59:26
|
Or this, if you are going to screw up indexes anyway.WHERE DATEDIFF(DAY, t1.DateCol, t2.DateCol) = 0 E 12°55'05.63"N 56°04'39.26" |
 |
|
|
|
|
|