Skip Headers
Oracle® OLAP DML Reference
10g Release 2 (10.2)

Part Number B14346-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

BEGINDATE

For dimensions of type DAY, WEEK, MONTH, QUARTER, or YEAR, the BEGINDATE function returns the first date of the first time period in dimension status for which the expression has a non-NA value. For example, assume that an expression is dimensioned by month, and that Jan97 is the first dimension value for which the expression has a non-NA value. In this case, BEGINDATE returns the date January 1, 1997.

Note:

You cannot use this function for time dimensions that are implemented as hierarchical dimensions of type TEXT.

Return Value

DATE or text (see "Automatic Conversion of DATE Values to Text Values")

When all the values of the expression are NA, BEGINDATE returns NA.

Syntax

BEGINDATE(expression)

Arguments

expression

The expression must have exactly one dimension that has a type of DAY, WEEK, MONTH, QUARTER, or YEAR.

Examples

Example 10-30 Finding the Beginning Date

The following statements limit the values in the month, product, and district dimensions, then send the first date for which the units variable contains a non-NA value for unit sales of tents in the Chicago district to the current outfile.

LIMIT month TO ALL
LIMIT product TO 'TENTS'
LIMIT district TO 'CHICAGO'
SHOW BEGINDATE(units)

These statements produce the following output.

01JAN95