Skip navigation links

Oracle® OLAP Java API Reference
11g Release 1 (11.1)

B28128-01

Formats for the Input Parameter for the round and trunc Methods

The following table lists the format models you can use with either the round or trunc method when you call that method on a TypedExpression that has a date value. The default model, 'DD', results in the date rounded or truncated to the day with a time of midnight.

Input Parameter Format Models for the round and trunc Date Methods

Format Model Rounding or Truncating Unit
CC
SCC

One greater than the first two digits of a four-digit year

SYYYY
YYYY
YEAR
SYEAR
YYY
YY
Y

Year (rounds up on July 1)

IYYY
IY
IY
I

ISO Year

Q

Quarter (rounds up on the sixteenth day of the second month of the quarter)

MONTH
MON
MM
RM

Month (rounds up on the sixteenth day)

WW

Same day of the week as the first day of the year

IW

Same day of the week as the first day of the ISO year

W

Same day of the week as the first day of the month

DDD
DD
J

Day

DAY
DY
D

Starting day of the week

HH
HH12
HH24

Hour

MI

Minute


The starting day of the week used by the format models DAY, DY, and D is specified implicitly by the Oracle Database initialization parameter NLS_TERRITORY.


Copyright © 2002, 2007, Oracle. All rights reserved.