ROUND (dates) function in Oracle

ROUND (dates) is one of the vital Date/Time functions of Oracle. It is used to get a date rounded to a specific unit of measure. The ROUND (dates) function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i and Oracle 8i.

Syntax:

ROUND ( date, format )

Parameters:
date: It is used to specify the date to be rounded.
format: It is an optional parameter which is used to specify the unit of measure to be used for rounding.

Example:

ROUND( TO_DATE ('22-AUG-19'),'YEAR')

Output:

'01-JAN-20'

Explanation:
The YEAR format rounds up on 1st of July.