Below is a full list of datetime functions available in Oracle Database.
Function | Description |
---|---|
ADD_MONTHS() | Adds a given number of months to a date, and returns the result. |
CURRENT_DATE() | Returns the current date in the session time zone, in a value in the Gregorian calendar of data type DATE . |
CURRENT_TIMESTAMP() | Returns the current date and time in the session time zone, in a value of data type TIMESTAMP WITH TIME ZONE . |
DBTIMEZONE() | Returns the value of the database time zone. |
EXTRACT(datetime) | Extracts and returns the value of a specified datetime field from a datetime or interval expression. |
FROM_TZ() | Converts a timestamp value and a time zone to a TIMESTAMP WITH TIME ZONE value. |
LAST_DAY() | Returns the last day of the month that contains the supplied date. |
LOCALTIMESTAMP() | Returns the current date and time in the session time zone in a value of data type TIMESTAMP . |
MONTHS_BETWEEN() | Returns the number of months between two dates. |
NEW_TIME() | Converts the date from a specified time zone to another specified time zone, and returns the result. |
NEXT_DAY() | Returns the date of the first instance of the specified weekday that is later than the specified date. |
NUMTODSINTERVAL() | Converts a number to an INTERVAL DAY TO SECOND literal. |
NUMTOYMINTERVAL() | Converts a number to an INTERVAL YEAR TO MONTH literal. |
ORA_DST_AFFECTED() | Can be used only when changing the time zone data file of the database and upgrading the timestamp with the time zone data. See the Oracle documentation. |
ORA_DST_CONVERT() | Can be used only when changing the time zone data file of the database and upgrading the timestamp with the time zone data. See the Oracle documentation. |
ORA_DST_ERROR() | Can be used only when changing the time zone data file of the database and upgrading the timestamp with the time zone data. See the Oracle documentation. |
ROUND(date) | Returns a date rounded to a specified date unit. |
SESSIONTIMEZONE() | Returns the time zone of the current session. |
SYS_EXTRACT_UTC() | Extracts the UTC (Coordinated Universal Time) from a datetime value with time zone offset or time zone region name |
SYSDATE | Returns the current date and time set for the operating system on which the database server resides. |
SYSTIMESTAMP | Returns the system date, including fractional seconds and time zone, of the system on which the database resides. |
TO_CHAR(datetime) | Converts a datetime or interval value to a VARCHAR2 value in the format specified by the date format. |
TO_DSINTERVAL() | Converts its argument to a value of INTERVAL DAY TO SECOND data type. |
TO_TIMESTAMP() | Converts its argument to a value of TIMESTAMP data type. |
TO_TIMESTAMP_TZ() | Converts its argument to a value of TIMESTAMP WITH TIME ZONE data type. |
TO_YMINTERVAL() | Converts its argument to a value of INTERVAL MONTH TO YEAR data type. |
TRUNC(date) | Returns the given date value with the time portion of the day truncated to the unit provided in the specified format model. |
TZ_OFFSET() | Returns the time zone offset corresponding to the argument based on the date the statement is executed. |