Oracle SYSDATE function
Description
The SYSDATE function is used to retrieve the current date and time set for the operating system on which the database resides.
Uses of Oracle SYSDATE Function
- Retrieving Current Date and Time: Get the current date and time from the database server’s operating system.
- Timestamping Records: Use the current date and time to timestamp records in database operations.
- Calculating Date Differences: Perform date arithmetic by comparing SYSDATE with other date values.
- Scheduling Tasks: Assist in scheduling and executing tasks based on the current system time.
Syntax:
SYSDATE
Parameters:
The function requires no parameters.
Applies to:
Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i
Return Value:
This function returns the date and time set for the operating system of your local database.
Pictorial Presentation
Examples: Oracle SYSDATE function
The following statement returns the current operating system date and time :
SQL> SELECT TO_CHAR(SYSDATE, 'MM-DD-YYYY HH24:MI:SS') "NOW"
2 FROM DUAL;
Sample Output:
NOW ------------------- 05-01-2015 15:39:45
Previous:
SYS_EXTRACT_UTC
Next:
SYSTIMESTAMP
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://www.w3resource.com/oracle/datetime-functions/oracle-sysdate-function.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics