Oracle9i SQL Reference Release 1 (9.0.1) Part Number A90125-01 |
|
Functions, 41 of 166
extract_datetime::=
extract_datetime
An EXTRACT
datetime function extracts and returns the value of a specified datetime field from a datetime or interval value expression. When you extract a TIMEZONE_REGION
or TIMEZONE_ABBR
(abbreviation), the value returned is a string containing the appropriate time zone name or abbreviation. When you extract any of the other values, the value returned is in the Gregorian calendar. When extracting from a datetime with a time zone value, the value returned is in UTC. For a listing of time zone names and their corresponding abbreviations, query the V$TIMEZONE_NAMES
dynamic performance view.
See Also:
|
The following example returns the number 1998.
SELECT EXTRACT(YEAR FROM DATE '1998-03-07') FROM DUAL; EXTRACT(YEARFROMDATE'1998-03-07') --------------------------------- 1998
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|