This Oracle tutorial explains how to use the Oracle/PLSQL CURRENT_TIMESTAMP function with syntax and examples.
The Oracle/PLSQL CURRENT_TIMESTAMP function returns the current date and time in the time zone of the current SQL session as set by the ALTER SESSION command. It returns a TIMESTAMP WITH TIME ZONE value.
The syntax for the CURRENT_TIMESTAMP function in Oracle/PLSQL is:
There are no parameters or arguments for the CURRENT_TIMESTAMP function.
The CURRENT_TIMESTAMP function returns a TIMESTAMP WITH TIME ZONE value.
The CURRENT_TIMESTAMP function can be used in the following versions of Oracle/PLSQL:
The CURRENT_TIMESTAMP function can be used in Oracle/PLSQL.
If the following ALTER SESSION command was issued:
And then the following SQL statement was executed:
You might get the following result:
You then modified the session time zone with the following ALTER SESSION command:
And then the following SQL statement was executed:
You would now get the following result:
The session time zone value has changed from -7:0 to -2:0, causing the CURRENT_TIMESTAMP function to return the current date and time as a value 5 hours ahead.