Oracle/PLSQL: SYSDATE Function: Syntax
Oracle/PLSQL: SYSDATE Function: Syntax
In Oracle/PLSQL, the SYSDATE function returns the current system date and time on your local database.
Syntax
The syntax for the SYSDATE function is: SYSDATE
Applies To
Example #1
The SYSDATE function can be used in Oracle/PLSQL. For example: select SYSDATE into v_date from dual; The variable called v_date will now contain the current date and time value.
Example #2
You could also use the SYSDATE function in any SQL statement. For example: select supplier_id, SYSDATE from suppliers where supplier_id > 5000;
Example #3
If you wanted to extract the date portion only (and exclude the time component), you could use the TO_CHAR function. For example: select supplier_id, TO_CHAR(SYSDATE, 'yyyy/mm/dd') from suppliers where supplier_id > 5000;