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 |
|
bill_
Starting Member
38 Posts |
Posted - 2009-04-20 : 10:39:43
|
| Hello,I am trying to query for records with dates that are within a year of each other. Date1 is a datetime type and the date2 is a string like 20081225. When I tryselect * from table1 where datediff(year,date1,convert(datetime,date2,112))<1the number comes out too high.What am I doing wrong?Thanks |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
|
|
|