I am trying to pull records from a SQL database for a specific shift, eg. 8AM to 4PM. The problem comes in that I want all records where the time part falls in that shift, but it shouldn&#039;t matter for the day part, because in my search a date range is selected as well as a shift range, to display all records that fall in a specific shift (eg: the day shift or night shift) in a specific date range(which could be anything from 1 day to 4 years. I managed to select the records by using the following statement which only looks at the hour. I need to narrow it down to minutes as well:<BR>SQL="SELECT * FROM DB WHERE " _<BR> & "DateStamp between "_<BR> & "&#039;" &CDate(dtmStartDate)& "&#039; and &#039;" &CDate(dtmEndDate)& "&#039;" _<BR> & "and DATEPART(hour, DateStamp) between "_ <BR> & "DATEPART(hour, CONVERT(datetime,&#039;" & shiftstart & "&#039;)) "_<BR> & "AND DATEPART(hour, CONVERT(datetime,&#039;" & shiftend & "&#039;))"<BR>