The ROUND Function : ROUND « Date Timestamp Functions « Oracle PL/SQL Tutorial






ROUND is very similar to the TRUNC function.

It uses the same format mask as TRUNC.

ROUND rounds up or down based upon the format mask.

The default mask when specifying a DATE value is DD.

Some useful purposes for this are

  1. Rounding to the nearest minute for billing cellular-based calls
  2. Rounding to closest month to determine a pay period

The Syntax for the ROUND Function

ROUND(input_date and time or number,rounding_specification)








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