Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Dealing with dates
7. Using comparison operators with dates
Working with time
Date and time data types in PostgreSQL
Extracting dates and times
Timezone conversion
Format date and time
Current date and time data
Summary

Instruction

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

SELECT
  id,
  model,
  produced_date
FROM aircraft
WHERE produced_date > '2010-12-31';

In PostgreSQL, 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, the "less than" sign (<) will show all dates before the given date.

Exercise

Select the id, route_code, and flight_date columns for all flights after December 31, 2014.