AI Academy
Promotion
CodeGym University
Learning
Courses
Tasks
Surveys & Quizzes
Games
Help
Schedule
Community
Users
Forum
Chat
Articles
Success stories
Activity
Reviews
Subscriptions
Light theme
Lessons
Reviews
About us
Start
Start learning
Start learning now
My Progress
Courses
University
Quest Map
Lessons
SQL
SQL
Level 31
Data Types for Working with Time and Dates:
DATE
,
TIME
,
TIMESTAMP
,
TIMESTAMPTZ
SQL SELF
Level 31,
Lesson 0
Learn how to properly store and handle dates and time in PostgreSQL using specialized data types:
DATE
,
TIME
,
TIMESTAMP
, and
TIMESTAMPTZ
. Usage examples, benefits, and practical tips for working with temporal data.
Functions for getting the current date and time:
NOW()
,
CURRENT_DATE
,
CURRENT_TIME
SQL SELF
Level 31,
Lesson 1
Learn how to use
NOW()
,
CURRENT_DATE
, and
CURRENT_TIME
functions in PostgreSQL to work with the current date and time. Examples, practical tips, and a comparison with
CURRENT_TIMESTAMP
.
Extracting Date Parts: EXTRACT() and AGE()
SQL SELF
Level 31,
Lesson 2
Learn how to pull out specific parts of date and time using the EXTRACT() function, and how to calculate age and intervals between dates with AGE() in PostgreSQL. Real-life examples, common mistakes, and tips for working with temporal data like a pro.
Date Format Conversion
SQL SELF
Level 31,
Lesson 3
Learn how to convert dates and timestamps in PostgreSQL using the TO_CHAR() and TO_DATE() functions: formatting for reports, user interfaces, and APIs, plus converting strings back to dates. Real-life examples, common mistakes, and pro tips.
Working with Time Intervals: INTERVAL
SQL SELF
Level 31,
Lesson 4
Learn how to use the INTERVAL data type in PostgreSQL to work with time spans: adding, subtracting, calculating the difference between dates, and practical examples for real-world tasks.
Please enable JavaScript to continue using this application.