TRUNCATE+DATE

=TRUN C= 

Syntax:
trunc(date,[format])

Description:
The TRUNC function returns a date truncated to a specific unit of measure. Format is the unit of measure to apply for truncating. If the format parameter is omitted, the TRUNC function will truncate the date to the day value, so that any hours, minutes, or seconds will be truncated off.

Examples :


SELECT TRUNC(to_date('22-AUG-03'), 'YEAR') FROM dual
 * TRUNC(TO-DATE('22_AUG_03'),'YEAR') ||
 * 01-JAN-03 ||

SELECT TRUNC(to_date('22-AUG-03'),'Q') FROM dual  SELECT TRUNC(to_date('22-AUG-03'),'DAY') FROM dual
 * TRUNC(TO_DATE('22-AUG-03'),'Q') ||
 * 01-JUL-03 ||
 * TRUNC(TO_DATE('22-AUG-03'),'DAY') ||
 * 17-AUG-03 ||