7. Handling Dates

Worksheet Overview

Business databases have to be able to enter date (and time) information in various formats, display it in different formats and to be able to perform comparisons and calculations.

Unfortunately, date formats and date handling vary greatly between different SQL versions.


1. Demo: Extracting parts of dates
2. Demo: Comparing dates
3. Task: List all analysts hired after 30 april 1996.
4. Demo: To compute dates.
5. Demo: Current date and time
6. Demo: To compute date intervals.
7. Task: How many weeks has each employee worked?
8. Task: What's the average number of years employees have worked, analysed by department?
9. Read: Completed

Related worksheets

1. Introduction to the Emp-dept case study
2. Some simple SQL Select statements
3. Using Functions
4. Selecting ROWS to display
5. Multiple tables
6. Summarising and Grouping
8. Inner and Outer Joins