This Oracle tutorial explains how to use the Oracle/PLSQL SYSDATE function with syntax and examples.
The Oracle/PLSQL SYSDATE function returns the current system date and time on your local database.
The syntax for the SYSDATE function in Oracle/PLSQL is:
There are no parameters or arguments for the SYSDATE function.
The SYSDATE function returns a date value.
The SYSDATE function can be used in the following versions of Oracle/PLSQL:
Let's look at some Oracle SYSDATE function examples and explore how to use the SYSDATE function in Oracle/PLSQL.
For example:
The variable called v_date will now contain the date and time at the moment the command is executed.
You could also use the SYSDATE function in any SQL statement.
For example:
If you wanted to extract the date portion only (and exclude the time component), you could use the TO_CHAR function.
For example: