Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Semestr2 / 1 - Oracle / Oracle selected docs / SQL reference.pdf
Скачиваний:
24
Добавлен:
12.05.2015
Размер:
11.92 Mб
Скачать

ROUND and TRUNC Date Functions

XMLTRANSFORM(W.WAREHOUSE_SPEC,X.COL1).GETCLOBVAL()

--------------------------------------------------------------------------------

<Warehouse>

<Area>50000</Area>

<Building>Rented</Building> <DockType>Side load</DockType> <Docks>1</Docks> <Parking>Lot</Parking> <RailAccess>N</RailAccess> <VClearance>12 ft</VClearance> <WaterAccess>Y</WaterAccess>

</Warehouse>

ROUND and TRUNC Date Functions

Table 6–4 lists the format models you can use with the ROUND and TRUNC date functions and the units to which they round and truncate dates. The default model, ’DD’, returns the date rounded or truncated to the day with a time of midnight.

Table 6–4 Date Format Models for the ROUND and TRUNC Date Functions

Format Model

Rounding or Truncating Unit

 

 

CC

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

SCC

 

 

 

SYYYY

Year (rounds up on July 1)

YYYY

 

YEAR

 

SYEAR

 

YYY

 

YY

 

Y

 

 

 

IYYY

ISO Year

IY

 

IY

 

I

 

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

MONTH Month (rounds up on the sixteenth day)

MON

MM

RM

Functions 6-221

Соседние файлы в папке Oracle selected docs