Oracle CURRENT_DATE Function: A Simple Guide

The CURRENT_DATE function in Oracle SQL is a simple function that returns the current date and time based on your session's time zone.

A common point of confusion is its name. Despite being called CURRENT_DATE, the DATE data type in Oracle always includes a time component (hours, minutes, and seconds). This function is very similar to SYSDATE, but CURRENT_DATE respects your session's time zone, while SYSDATE uses the database server's time zone.

What is the CURRENT_DATE Function in Oracle?

The CURRENT_DATE function returns a DATE value representing the current date and time in the time zone of the current SQL session. If you change your session's time zone, the output of CURRENT_DATE will also change to reflect that.

CURRENT_DATE Function Syntax

The syntax for CURRENT_DATE is one of the simplest in Oracle, as it requires no arguments:

CURRENT_DATE

A Note on Viewing Results

By default, your SQL tool might only show the date (e.g., '06-NOV-25'). To see the full date and time returned by CURRENT_DATE, you should first run this command to change your session's date format:

ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';

Oracle CURRENT_DATE Function Examples

Here are two practical examples of how to use CURRENT_DATE.

Example 1: Getting the Current Date and Time

This example simply selects the CURRENT_DATE from the DUAL table.

Query: (First, we change the format so we can see the time.)

ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';

SELECT 
  CURRENT_DATE 
FROM DUAL;

Result: (The result will be the date and time when you run the query, in your session's time zone.)

CURRENT_DATE
--------------------
06-NOV-2025 16:02:45

Example 2: Showing the Effect of Session Time Zone

This example shows how CURRENT_DATE changes when you alter your session's time zone.

Query:

-- Set session time zone to New York (UTC-5:00)
ALTER SESSION SET TIME_ZONE = '-5:00';
SELECT 
  SESSIONTIMEZONE, 
  CURRENT_DATE 
FROM DUAL;

-- Set session time zone to Los Angeles (UTC-8:00)
ALTER SESSION SET TIME_ZONE = '-8:00';
SELECT 
  SESSIONTIMEZONE, 
  CURRENT_DATE 
FROM DUAL;

Result: (The times will reflect the 3-hour difference between the two time zones.)

SESSIONTIMEZONE CURRENT_DATE
--------------- --------------------
-05:00          06-NOV-2025 05:33:10

SESSIONTIMEZONE CURRENT_DATE
--------------- --------------------
-08:00          06-NOV-2025 02:33:10
Get more Vinish.dev tutorials on Google

See my articles more often when you search Google.

Vinish Kapoor
Vinish Kapoor

An Oracle ACE, author of four books on Oracle APEX, SQL and PL/SQL, and Oracle Forms, and a software developer building Oracle database applications since 2001.

guest

0 Comments
Oldest
Newest Most Voted