On January 28th at 9:00 UTC Academy will be unavailable for 10 minutes due to planned maintenance break.
Kickstart 2020 with new opportunities! - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Dealing with dates
7. Using logical operators with dates
Working with time data
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

Instruction

Well done! It is also quite easy to use dates with other logical operators. Take a look at the following example:

SELECT
  Id,
  Model,
  ProducedDate
FROM Aircraft
WHERE ProducedDate > '2010-12-31';

In T-SQL, a date that is "greater than" 2010-12-31 means all the dates after December 31, 2010 (i.e., from 2011-01-01 to today). Similarly, putting the "less than" sign instead (<) will show all dates before the given date.

Exercise

Select the Id, Model, and ProducedDate columns for all aircraft produced after December 31, 2012.

Stuck? Here's a hint!

Remember about the proper date format and use quotes: 'YYYY-MM-DD'.