<div dir="ltr">Oracle's ROUND(<dt>, <fmt>) function returns a date rounded to the period specified as a parameter in the form of a date format. For example, if you specify "YEAR" as the parameter, the function will round the date either to the first day of the year (if the date is before July) or to the last day of the year (if the date is in July or later).<br><br>The rounding is applied at:<br>Year - 1st July<br>Quarter - 16th of second month in quarter<br>Month - 16th of month<br>Week - 3.5 days into week<br><br>Check out the examples!<br><br><br>"CURRENT_DATE"                "ROUNDED_VALUE"               "ROUNDING_GRAIN"              "ROUNDING_DESCRIPTION"        <br>"03/07/25"                    "30/12/24"                    "IYYYY"                       "Year containing the calendar week, as defined by the ISO 8601 standard"<br>"03/07/25"                    "01/01/25"                    "SYYYY"                       "Year (rounds up on July 1)"  <br>"03/07/25"                    "29/06/25"                    "DAY"                         "Starting day of the week"    <br>"03/07/25"                    "30/06/25"                    "IW"                          "Same day of the week as the first day of the calendar week as defined by the ISO 8601 standard, which is Monday"<br>"03/07/25"                    "01/07/25"                    "MM"                          "Month (rounds up on the sixteenth day)"<br>"03/07/25"                    "01/07/25"                    "Q"                           "Quarter (rounds up on the sixteenth day of the second month of the quarter)"<br>"03/07/25"                    "01/07/25"                    "W"                           "Same day of the week as the first day of the month"<br>"03/07/25"                    "02/07/25"                    "WW"                          "Same day of the week as the first day of the year"<br>"03/07/25"                    "03/07/25"                    "DD"                          "Day"<br><br><br><br>select CURRENT_DATE, TRUNC(CURRENT_DATE, 'W') as rounded_value, 'W' as rounding_grain, 'Same day of the week as the first day of the month' as rounding_description<br>union<br>select CURRENT_DATE, TRUNC(CURRENT_DATE, 'SYYYY'), 'SYYYY', 'Year (rounds up on July 1)'<br>union<br>select CURRENT_DATE, TRUNC(CURRENT_DATE, 'IYYY'), 'IYYYY', 'Year containing the calendar week, as defined by the ISO 8601 standard'<br>union<br>select CURRENT_DATE, TRUNC(CURRENT_DATE, 'Q'), 'Q', 'Quarter (rounds up on the sixteenth day of the second month of the quarter)'<br>union<br>select CURRENT_DATE, TRUNC(CURRENT_DATE, 'MM'), 'MM', 'Month (rounds up on the sixteenth day)'<br>union<br>select CURRENT_DATE, TRUNC(CURRENT_DATE, 'WW'), 'WW', 'Same day of the week as the first day of the year'<br>union<br>select CURRENT_DATE, TRUNC(CURRENT_DATE, 'IW'), 'IW', 'Same day of the week as the first day of the calendar week as defined by the ISO 8601 standard, which is Monday'<br>union<br>select CURRENT_DATE, TRUNC(CURRENT_DATE, 'DD'), 'DD', 'Day'<br>union<br>select CURRENT_DATE, TRUNC(CURRENT_DATE, 'DAY'), 'DAY', 'Starting day of the week'<br>;<br>                        <br></div>