CodeBlanks Logo Icon CodeBlanks

CURRENT_DATE and NOW

Get today's date and current time.

CURRENT_DATE

CURRENT_DATE returns today's date; CURRENT_TIMESTAMP returns date and time. They take no arguments.

SELECT CURRENT_DATE AS bugun;

This query returns today's date.

The expression CURRENT_DATE AS bugun is evaluated and returned.

CURRENT_DATE — details

Some databases use CURDATE() or GETDATE(). The ANSI standard is CURRENT_DATE. It can also be a default column value.

Practice CURRENT_DATE

Select today's date aliased as bugun.

Starter code

query.sql
-- today
SELECT

Expected output

bugun
2026-01-15

Questions and answers

Review the lesson questions together with their answers. To test yourself, solve the lesson interactively.

1 What does CURRENT_DATE return?

  • Tomorrow's date
  • The current time
  • Yesterday's date
  • Today's date Correct answer

Explanation: CURRENT_DATE returns today.

2 Today

Question
SELECT ____ AS bugun;
Answer
SELECT CURRENT_DATE AS bugun;

Explanation: CURRENT_DATE is the right answer.

3 CURRENT_DATE and NOW: match the terms

Term Meaning
CURRENT_DATE today
CURRENT_TIMESTAMP date+time
NOW now
DATE date

All lessons in Beginner