Rounding to the nearest minute : ROUND Date « Date Timezone « Oracle PL / SQL






Rounding to the nearest minute



SQL>
SQL>
SQL> -- Rounding to the nearest minute.
SQL> SELECT TO_CHAR(ROUND(TO_DATE('070299 01:00:35 AM', 'MMDDYY HH:MI:SS AM'),
  2             'MI'), 'DD-MON-YY HH:MI:SS AM') "Rounded to nearest Minute"
  3  from DUAL;

Rounded to nearest Mi
---------------------
02-JUL-99 01:01:00 AM

SQL>
SQL>
           
       








Related examples in the same category

1.Syntax: ROUND(, [])
2.ROUND: Round a date to a particular month or year
3.select round( sysdate )
4.select round( sysdate, 'year' )
5.select round( sysdate, 'month' )
6.select round( sysdate, 'q' ) "Quarter"