Oracle9i SQL Reference Release 2 (9.2) Part Number A96540-01 |
|
Functions, 42 of 177
extract_datetime::=
EXTRACT
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, 2002 Oracle Corporation. All Rights Reserved. |
|