I am trying to write a query that will look for records that match a particilar time (ie 11:30am and 2.30pm) during a particiluar date period (ie 1 dec 2009 and 31 dec 2009).
I can get the records for the date period in question but not quite sure how to filter that again to the time period. The date and time are in the same database field. My query so far is included.
I'm sure this is quite easy but unfortunately it escapes me at the moment. Thanks for the help in advance. BTW I'm using SQL Server 2005.
WHERE Item.StartDateTime BETWEEN '1 dec 2009' AND '1 jan 2010'