Only this week, get the SQL Complete Track of 9 courses in a special prize of $330 $89!
Dealing with dates
Working with time data
13. Using BETWEEN with time
Date and time date
Extracting dates and times
Doing arithmetic with dates
Converting date and time data
Building date and time data from parts
Summary and review


You can also use BETWEEN with time data:

FROM Route
WHERE ArrivalTime BETWEEN '12:00:00'
  AND '15:00:00';

Remember that BETWEEN is inclusive—in the above query, routes that depart at 12 AM or 3 PM will be included in the results.


Show the codes for all routes departing between 11 AM and 5 PM.

Stuck? Here's a hint!

Remember about the proper time format and use quotes: 'hh:mm:ss'. Note that 5:00 PM is '17:00:00' in T-SQL.