Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Dealing with dates
Working with time
Date and time data types in PostgreSQL
Extracting dates and times
25. DATE_PART() with the wrong data type
Timezone conversion
Format date and time
Current date and time data
Summary

Instruction

All right! You may wonder what happens when you try to extract a field which is not present in the given type. Is it possible to extract a year from a time column? Let's find out.

Exercise

Run the template query which, for each route, tries to extract the year from the arrival_time column, and see what happens.