| Lesson Plan |
| Grade: |
Date: 01/12/2025 |
| Subject: Information Communication Technology ICT |
| Lesson Topic: Be able to set display format of date/time data |
Learning Objective/s:
- Identify date/time data types and the appropriate formatting functions in major DBMS.
- Apply DBMS‑specific functions to display dates/times in a chosen format.
- Convert UTC timestamps to local time zones before formatting.
- Compare the syntax of formatting functions across MySQL, PostgreSQL, Oracle, and SQL Server.
- Produce a correctly formatted query for a report based on a given specification.
|
Materials Needed:
- Projector and screen
- Computer with MySQL, PostgreSQL, Oracle, and SQL Server installed
- Sample “orders” database
- Worksheet with practice questions
- Handout of common format specifiers
- Internet access for documentation lookup
|
Introduction:
Begin with a short video showing how inconsistent date formats can cause errors in business reports. Ask students what they already know about SELECT statements and date fields. Explain that by the end of the lesson they will be able to format dates correctly for any DBMS and meet the success criteria of writing a query that displays dates in a specified format.
|
Lesson Structure:
- Do‑now (5'): Quick quiz on date/time data types and basic SELECT syntax.
- Mini‑lecture (10'): Overview of formatting functions (DATE_FORMAT, TO_CHAR, FORMAT) and common specifiers for MySQL, PostgreSQL, Oracle, SQL Server.
- Guided demo (12'): Live coding of example queries showing different output formats.
- Pair activity (15'): Students complete practice questions on worksheets; teacher circulates to provide feedback.
- Time‑zone conversion demo (8'): Demonstrate CONVERT_TZ and equivalent functions, then format the result.
- Whole‑class review & Q&A (5'): Discuss key takeaways and clarify any misconceptions.
|
Conclusion:
Recap why consistent date formatting and proper time‑zone handling are essential for accurate reporting. For the exit ticket, each student writes a query in any DBMS that returns the current date as DD/MM/YYYY. Assign the worksheet’s additional formatting scenarios as homework.
|