Oracle CURRENT_DATE function
How to get the current date in the session time zone in Oracle?
CURRENT_DATE returns the current date in the session time zone, in a value in the Gregorian calendar of datatype DATE.
Syntax:
CURRENT_DATE
Parameters:
No parameters or arguments
Applies to:
Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i
Pictorial Presentation

Example: Oracle CURRENT_DATE() function
The following statement shows the current date in 'DD-MON-YYYY HH24:MI:SS' format :
SQL> ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
Session altered.
Let display the current date and session timezone.:
SQL> ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS';
Session altered.
SQL> SELECT CURRENT_DATE, SESSIONTIMEZONE FROM DUAL;
Sample Output:
CURRENT_DATE SESSIONTIMEZONE -------------------- ----------------------- 01-MAY-2015 11:19:41 +05:30
Let change the session timezone using ALTER SESSION command :
SQL> ALTER SESSION SET TIME_ZONE = '-2:0';
Session altered.
Now check the current date and session timezone :
SQL> SELECT CURRENT_DATE, SESSIONTIMEZONE FROM DUAL;
Sample Output:
CURRENT_DATE SESSIONTIMEZONE -------------------- ----------------------- 01-MAY-2015 04:26:26 -02:00
Previous:
ADD_MONTHS
Next:
CURRENT_TIMESTAMP
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- JavaScript String Exercises
- JavaScript HTML Form Validation
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join