Date and Time Functions in SQL

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

CURRENTDATE

CURRENT_DATE returns the current date in the session time zone, in a value in the Gregorian calendar of data type DATE.

DBTIMEZONE

DBTIMEZONE returns the value of the database time zone. The return type is a time zone offset (a character type in the format '[+|-]TZH:TZM') or a time zone region name, depending on how the user specified the database time zone value in the most recent CREATE DATABASE or ALTER DATABASE statement.

CURRENT_TIMESTAMP

Returns the current date and time from the user session with a data type of TIMESTAMP WITH TIME ZONE.

LOCALTIMESTAMP

Returns the current date and time from the user session with a data type of TIMESTAMP.

CURRENT_DATE

Returns the current date from the user session with a data type of DATE.

SYSDATE

SYSDATE returns the current date and time set for the operating system on which the database server resides. The data type of the returned value is DATE, and the format returned depends on the value of the NLS_DATE_FORMAT initialization parameter.

SYSTIMESTAMP

SYSTIMESTAMP returns the system date, including fractional seconds and time zone, of the system on which the database resides. The return type is TIMESTAMP WITH TIME ZONE.

TIMESTAMP data type

The TIMESTAMP data type is an extension of the DATE data type. It stores the year, month, and day of the DATE data type, plus hour, minute, and second values. This data type is useful for storing precise time values and for collecting and evaluating date information across geographic regions.


Kaugnay na mga set ng pag-aaral

Permit Test Unit 2 (LEARNING TO DRIVE)

View Set

Ch 14 - High-Risk Postpartum Nursing Care

View Set