rehan ahmad 2011-02-02 00:00:00.000 2011-02-03 00:00:00.000 Mohd Wasif 2011-01-28 00:00:00.000 2011-01-28 00:00:00.000 Mohd Wasif 2011-03-09 00:00:00.000 2011-03-09 00:00:00.000 Mohd Wasif 2011-05-02 00:00:00.000 2011-05-02 00:00:00.000 rehan ahmad 2011-02-23 00:00:00.000 2011-02-26 00:00:00.000 rehan ahmad 2011-03-04 00:00:00.000 2011-03-05 00:00:00.000 rehan ahmad 2011-03-07 00:00:00.000 2011-03-08 00:00:00.000 Mohd Wasif 2011-03-07 00:00:00.000 2011-03-08 00:00:00.000 Mohd Wasif 2011-03-04 00:00:00.000 2011-03-04 00:00:00.000 Mohd Wasif 2011-02-04 00:00:00.000 2011-02-04 00:00:00.000
select * from your_table where '01/13/2011' between startdate and enddate OR select * from your_table where '01/13/2011' between CONVERT(VARCHAR(10), startdate, 101) AND CONVERT(VARCHAR(10), enddate, 101)
select * from mytable where startdate <= @myDate and enddate >= @mydate
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)