Oracle9i SQL Reference
Release 1 (9.0.1)

Part Number A90125-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

Functions, 165 of 166


ROUND and TRUNC Date Functions

Table 6-12 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-12  Date Format Models for the ROUND and TRUNC Date Functions
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 initialization parameter NLS_TERRITORY.

See Also:

Oracle9i Database Reference and Oracle9i Globalization Support Guide for information on this parameter 


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback