Pages
▼
Saturday, 24 August 2013
Get Current Date
Oracle:
SYSDATE
Purpose
SYSDATE is a pseudo column
SYSDATE returns the current date and time set for the operating system on which the database resides.
The data type of the returned value is DATE.
The format returned depends on the value of the NLS_DATE_FORMAT initialization parameter.
The function requires no arguments.
In distributed SQL statements, this function returns the date and time set for the operating system of your local database.
You cannot use this function in the condition of a CHECK constraint.
Applies To
Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i, Oracle 8i
Examples
The following example returns the current operating system date and time:
SELECT TO_CHAR
(SYSDATE, 'MM-DD-YYYY HH24:MI:SS') "NOW"
FROM DUAL;
NOW
-------------------
04-13-2001 09:45:51
Select sysdate from dual;
--------------------------------
24-AUG-13
No comments:
Post a Comment