PL/SQL Round
Oracle PL/SQL Round Function
The Round function(numbers) allow you to round up any number to a certain number of decimal places.
The Round function(dates)) returns a date rounded to a specific unit of measure.
The Round Function syntax:
round( number, [ decimal_numbers ] )
round( date, [ format ] )
Example Round numbers
Select round(657.143) From dual; 657 Select round(657.143,0) From dual; 657 Select round(657.143,2) From dual; 657.14 Select round(-657.143,2) From dual; -657.14
Example Round dates
Select round(to_date ('17-DEC-09'),'YEAR') From dual; 1/1/2010 Select round(to_date ('21-SEP-09'),'Q') From dual; 10/1/2009 Select round(to_date ('22-OCT-09'),'MONTH') From dual; 11/1/2009 Select round(to_date ('22-OCT-09'),'DDD') From dual; 10/22/2009 Select round(to_date ('22-MAY-09'),'DAY') From dual; 5/24/2009