Skip to main content
SQL โ€ข LESSON 33

CURRENT_DATE & CURRENT_TIMESTAMP

How do we capture current system date and timestamps in queries?

Intermediateโฑ 3 Minutesโญ 520 XP
๐Ÿค” THE QUESTION

How do we capture current system date and timestamps in queries?

๐Ÿ’ก WHAT IS IT?

CURRENT_DATE returns the current date, and CURRENT_TIMESTAMP returns the current date and time.

๐ŸŽฏ WHAT IS IT USED FOR?

Audit columns (created_at, updated_at), real-time reporting, calculating dynamic day offsets.

๐Ÿ’ป EXAMPLE
SELECT
CURRENT_DATE AS today,
CURRENT_TIMESTAMP AS current_time;

๐ŸŽฏ Mission Objectives

Practice typing production-grade SQL code for CURRENT_DATE & CURRENT_TIMESTAMP.

  • โœ“ CURRENT_DATE
  • โœ“ CURRENT_TIMESTAMP
  • โœ“ System dates
  • โœ“ Column Aliases