CALENDAR_X_OF_Y
-
dtexpris a datetime expression with one of the following types (or any value that can be implicitly converted toDATE):DATE,TIMESTAMP,TIMESTAMP WITH TIME ZONE,TIMESTAMP WITH LOCAL TIME ZONE. -
nlsparamis a text expression representing an NLS parameter setting. The only currently supported parameter isNLS_DATE_LANGUAGE, and is specified in the same manner as forTO_CHARandTO_DATE. -
The
index_byparameter is a text value that must resolve to eitherPOSITIONorDATE(case-insensitive, defaults toDATE). It is used to distinguish between absolute and position-based numbers for the following cases:CALENDAR_DAY_OF_WEEKFISCAL_DAY_OF_WEEKRETAIL_DAY_OF_WEEKFISCAL_MONTH_OF_YEARRETAIL_MONTH_OF_YEAR
The CALENDAR_X_OF_Y functions return a NUMBER indicating the relative number of one period with a given ancestor period. Since years have no ancestor, year numbers are obtained with the YEAR_NUMBER functions.
