date from date to 2012-02-01 00:00:00.000 2012-09-15 00:00:00.000 2012-09-16 00:00:00.000 2013-06-15 00:00:00.000
Declare @inputDate datetime Set @inputDate = Convert(datetime, '2012-05-01', 120) select * from dateTimeTable where dateFrom >= @inputDate and dateTo < @inputDate
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)