CodeGym
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
  • Rounding and Trimming Temporal Data: DATE_TRUNC()

    SQL SELF
    Level 32, Lesson 0
    The DATE_TRUNC() function lets you trim temporal values down to the time unit you need — year, month, day, hour, etc. It's an essential tool for analyzing and grouping temporal data in SQL. On this page, you'll learn how to use DATE_TRUNC() in practice, see some examples, and break down common mistakes.
    Available
  • Working with Unix Time: EPOCH

    SQL SELF
    Level 32, Lesson 1
    Learn what Unix time (EPOCH) is, how to convert dates to and from this format in PostgreSQL, and how to use it for storing and analyzing time data. Real-life examples, tips, and common mistakes.
    Available
  • Working with Time Zones: TIMEZONE

    SQL SELF
    Level 32, Lesson 2
    Learn how to properly handle time zones in PostgreSQL: the difference between TIMESTAMP and TIMESTAMPTZ, converting time between time zones, practical examples, and tips to avoid common date and time mistakes.
    Available
  • Window Functions for Time Data: LEAD(), LAG()

    SQL SELF
    Level 32, Lesson 3
    Learn how to use window functions LEAD() and LAG() to analyze time data in SQL: comparing events, calculating time differences, grouping by users, and common mistakes when working with time series.
    Available
  • Common Mistakes When Working with Dates and Time

    SQL SELF
    Level 32, Lesson 4
    Working with dates and time in databases and apps often leads to unexpected bugs: from picking the wrong data type to getting confused with time zones and formats. In this material, we’ll check out the most common mistakes related to handling dates and time, and give you some practical tips on how to avoid them.
    Available
Learn
  • Registration
  • Java Course
  • Help with Tasks
  • Pricing
  • Java Syntax
Community
  • Users
  • Articles
  • Forum
  • Chat
  • Success Stories
  • Activity
  • Affiliate Program
Company
  • About us
  • Contacts
  • Reviews
  • Press Room
  • CodeGym for EDU
  • FAQ
  • Support
CodeGym CodeGym is an online course for learning Java programming from scratch. This course is a perfect way to master Java for beginners. It contains 1200+ tasks with instant verification and an essential scope of Java fundamentals theory. To help you succeed in education, we’ve implemented a set of motivational features: quizzes, coding projects, content about efficient learning, and a Java developer’s career.
Follow us
Interface language
English
Deutsch Español हिन्दी Français Português Polski বাংলা 简体中文 मराठी தமிழ் Italiano Bahasa Indonesia 繁體中文 Nederlands 日本語 한국어 Bulgarian Danish Hungarian Basa Jawa Malay Norwegian Romanian Swedish Telugu Thai Українська Filipino Turkish Azərbaycan Русский Vietnamese
Programmers Are Made, Not Born © 2026 CodeGym
MastercardVisa
Programmers Are Made, Not Born © 2026 CodeGym