In Oracle Database, the CURRENT_DATE
function returns the current date in the session time zone, in a value in the Gregorian calendar of data type DATE
.
Tag: date functions
CURRENT_TIMESTAMP() Function in Oracle
In Oracle Database, the CURRENT_TIMESTAMP()
function returns the current date and time in the session time zone, in a value of data type TIMESTAMP WITH TIME ZONE
.
It’s similar to LOCALTIMESTAMP
, except that LOCALTIMESTAMP
returns a TIMESTAMP
value.
LOCALTIMESTAMP() Function in Oracle
In Oracle Database, the LOCALTIMESTAMP()
function returns the current date and time in the session time zone in a value of data type TIMESTAMP
.
It’s similar to CURRENT_TIMESTAMP
, except that CURRENT_TIMESTAMP
returns a TIMESTAMP WITH TIME ZONE
value.
SYSTIMESTAMP Function in Oracle
In Oracle Database, the SYSTIMESTAMP
function returns the system date, including fractional seconds and time zone, of the system on which the database resides.
The returned value is of type TIMESTAMP WITH TIME ZONE
.
SYSDATE Function in Oracle
In Oracle Database, the SYSDATE
function returns the current date and time set for the operating system on which the database server resides.
The returned value is of type DATE
.
EXTRACT (datetime) Function in Oracle
In Oracle Database, the EXTRACT(datetime)
function extracts and returns the value of a specified datetime field from a datetime or interval expression.
Change the Time Zone Offset on a datetimeoffset Value in SQL Server (T-SQL)
You can use the SWITCHOFFSET()
function in SQL Server to change the time zone offset on a datetimeoffset value.
The function accepts two arguments; a datetimeoffset(n) value (or an expression that can be resolved to a datetimeoffset(n) value), and the new time zone.
Continue readingMariaDB Date & Time Functions (Full List)
This article contains a full list of built-in MariaDB date and time functions.
Continue readingHow SQRT() Works in MariaDB
In MariaDB, ASIN()
is a built-in numeric function that returns the square root of its argument.
How ADD_MONTHS() Works in MariaDB
In MariaDB, ADD_MONTHS()
is a built-in date and time function that adds a given number of months to a date, and returns the result.
The date can be a date, datetime, or timestamp value.
This function was introduced in MariaDB 10.6.1 to enhance Oracle compatibility. There are at least 6 other ways to add months to a date in MariaDB.
Continue reading