All Products
Search
Document Center

MaxCompute:CURRENT_DATE

Last Updated:Mar 25, 2026

CURRENT_DATE returns the current date in a specified time zone as a DATE value.

Syntax

DATE CURRENT_DATE([STRING <time_zone>])

Example:

-- Returns 2025-09-24.
SELECT CURRENT_DATE('Asia/Shanghai');

Parameters

ParameterRequiredTypeDescription
time_zoneNoSTRINGThe time zone for the returned date. Accepts IANA time zone names (e.g., Asia/Shanghai), UTC offset strings (e.g., UTC+08:00), and short numeric offsets (e.g., +8). If omitted, the function uses the time zone of the current session or project.

Return value

Returns a DATE value, or NULL if the input is NULL.

Usage notes

  • The default project time zone is UTC+08:00. If no time_zone argument is passed and no session time zone is set, the function falls back to this default.

  • The time_zone parameter accepts three equivalent formats: IANA names (e.g., Asia/Shanghai), UTC offset strings (e.g., UTC-10:00), and short numeric offsets (e.g., -10). All three formats identify the same time zone interchangeably.

Examples

The following examples use Asia/Shanghai as the current project time zone, with the current time set to 2025-09-24 17:08:32.274.

Example 1: Get the current date in the session or project time zone.

-- Returns the date in the session's time zone.
-- Returns 2025-09-24.
SELECT CURRENT_DATE();

Example 2: Get the current date in the Hawaii time zone (UTC-10:00).

-- Returns 2025-09-23.
SELECT CURRENT_DATE('Pacific/Honolulu');

-- Equivalent statement using a UTC offset string. Returns 2025-09-23.
SELECT CURRENT_DATE('UTC-10:00');

-- Equivalent statement using a short numeric offset. Returns 2025-09-23.
SELECT CURRENT_DATE('-10');

Example 3: Pass NULL as the argument.

-- Returns NULL.
SELECT CURRENT_DATE(NULL);

Related functions

CURRENT_DATE is a date function. For other date functions, see Date functions.