TRUNC (Date)
Returns date with the time portion of the day truncated to the unit specified by the format model fmt. The value returned is of type DATE. If you do not specify fmt, then date is truncated to the nearest day.
SQL syntax
TRUNC (date[,fmt])
Parameters
TRUNC (date) has the parameters:
| Parameter | Description |
|---|---|
|
|
The date that is truncated. Specify the |
|
|
The format model truncating unit. Specify either a constant or a parameter for |
Description
See "Format Model for ROUND and TRUNC Date Functions" for information on the supported format models to use in fmt.
Examples
Command> SELECT TRUNC (TO_DATE ('27-OCT-92','DD-MON-YY'),'YEAR') FROM dual;
< 2092-01-01 00:00:00 >
1 row found.