The Oracle and PL/SQL TRUNC function returns a date truncated to the unit specified by the format model fmt.
TRUNC(d [,fmt])
The value returned is always of datatype DATE.
If you omit fmt, then date is truncated to the nearest day.
Example 1:
SELECT TRUNC(TO_DATE('31/10/2015','DD/MM/YYYY'),'YYYY') FROM DUAL;
returns:
01/01/2015
Example 2:
SELECT TRUNC(TO_DATE('31/10/2015','DD/MM/YYYY'),'MM') FROM DUAL;
returns:
01/10/2015