Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Dealing with dates
Working with time data
14. Sorting by TIME columns
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


Good! You can also sort by time:

FROM Route
ORDER BY ArrivalTime DESC;

Have you noticed that TIME and DATE data work very similarly?


Show the Code and ArrivalTime of all routes that arrive before 4 PM. Order them by arrival time, with the earliest time first.

Stuck? Here's a hint!

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