Sunday, August 18, 2013

Calendar Date/Time Functions for OBIEE

The calendar date/time functions manipulate data of the data types DATE and DATETIME based on a calendar year. You must select these functions together with another column; they cannot be selected alone.


Current_Date

Returns the current date. The date is determined by the system in which the Oracle BI Server is running.

Syntax    Current_Date

Current_Time

Returns the server current time. The time is determined by the system in which the Oracle BI Server is running.

Note: The Analytic Server does not cache queries that contain this function.

Syntax   Current_Time(integer)

Current_TimeStamp

Returns the current date/timestamp. The timestamp is determined by the system in which the Oracle BI Server is running.

Syntax  Current_TimeStamp(integer)

Day_of_Quarter

Returns a number (between 1 and 92) corresponding to the day of the quarter for the specified date.

Syntax  Day_Of_Quarter(dateExpr)

DayName

Returns the name of the day for a specified date.

Syntax  DayName(dateExpr)

DayOfMonth

Returns the number corresponding to the day of the month for a specified date.

Syntax  DayOfMonth(dateExpr)

DayOfWeek

Returns a number between 1 and 7 corresponding to the day of the week, Sunday through Saturday, for a specified date.

For example, the number 1 corresponds to Sunday and the number 7 corresponds to Saturday.

Syntax  DayOfWeek(dateExpr)

DayOfYear

Returns the number (between 1 and 366) corresponding to the day of the year for a specified date.

Syntax  DayOfYear(dateExpr)


Hour

Returns the number (between 0 and 23) corresponding to the hour for a specified time.
For example, 0 corresponds to 12 A.M. and 23 corresponds to 11 P.M.

Syntax  Hour(timeExpr)

Minute

Returns the number (between 0 and 59) corresponding to the minute for a specified time.

Syntax  Minute(timeExpr)

Month

Returns a number (between 1 and 12) corresponding to the month for a specified date.

Syntax  Month(dateExpr)

Month_Of_Quarter

Returns the number (between 1 and 3) corresponding to the month in the quarter for a specified date.

Syntax  Month_Of_Quarter(dateExpr)

MonthName

Returns the name of the month for a specified date.

Syntax  MonthName(dateExpr)

No comments:

Post a Comment