Oracle® OLAP DML Reference 10g Release 2 (10.2) Part Number B14346-01 |
|
|
View PDF |
The YYOF function returns an INTEGER
in the range of 1000 to 9999, giving the year in which a specified date falls. The result returned by YYOF has the same dimensions as the specified date expression.
Return Value
INTEGER
Syntax
YYOF(date-expression)
Arguments
An expression that has the DATE data type, or a text expression that specifies a date. The values of the text expression are converted automatically to DATE values, using the current setting of the DATEORDER option to resolve any ambiguity.
Notes
Commas in Year Values
When the COMMAS option is set to YES when you display the value returned by YYOF, the year is displayed with a comma separating the thousands (for example, 1,996
). To avoid this, you can set the COMMAS option to NO
before displaying the year.
Examples