From Oracle FAQ
Jump to: navigation, search

The TO_DSINTERVAL converts a string in format 'D[D...] HH:MI:SS' into a INTERVAL DAY TO SECOND data type.

The D[D...] part contains 1 to 9 figures indicating the number of days between 0 to 99999999. The HH:MI:SS part indicates the number of hours, minutes and seconds in the interval from 0:0:0 to 23:59:59.

SQL> SELECT TO_DSINTERVAL('0 10:20:30') from dual;
+000000000 10:20:30.000000000