Format Model for ROUND and TRUNC Date Functions
The table 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.
Format model | Rounding or truncating unit |
---|---|
|
Century If the last two digits of a four-digit year are between 01 and 99 (inclusive), then the century is one greater than the first two digits of that year. If the last two digits of a four-digit year are 00, then the century is the same as the first two digits of that year. For example, 2002 returns 21; 2000 returns 20. |
|
Year (rounds up on July 1) |
|
ISO year |
|
Quarter (rounds up on the sixteenth day of the second month of the quarter) |
|
Name of month (rounds up on the sixteenth day) |
|
Same day of the week as the first day of the year |
|
Same day of the week as the first day of the ISO week, which is Monday |
|
Same day of the week as the first day of the month |
|
Day of year |
|
Starting day of the week |
|
Hour |
|
Minute |