ROUND(x[, unit]) : round x. By default, x is rounded to the beginning of the nearest day : ROUND « Date Timestamp Functions « Oracle PL/SQL Tutorial






If you supply an optional unit string, x is rounded to that unit;

In the following example, YYYY rounds x to the first day of the nearest year.

SQL>
SQL> SELECT ROUND(TO_DATE('25-OCT-2005'), 'YYYY') FROM dual;

ROUND(TO_
---------
01-JAN-06








13.15.ROUND
13.15.1.The ROUND Function
13.15.2.Datetime Formatting Parameters for ROUND(x[, unit])
13.15.3.ROUND(x[, unit]) : round x. By default, x is rounded to the beginning of the nearest day
13.15.4.Round date to day
13.15.5.Rounds May 25, 2005, to the first day in the nearest month
13.15.6.Rounding to the Nearest Minute
13.15.7.ROUND(date_in_1,'CC')
13.15.8.Round result from months_between