The TO_DSInterval function in Oracle SQL / PLSQL is used to convert a string value to Interval Day to Second type.
Syntax for the TO_DSInterval function in Oracle SQL / PLSQL is:
SELECT TO_DSInterval(character_1 [nls_parameter])
FROM table_name;
- character_1 can be CHAR, VARCHAR2, NCHAR or NVARCHAR2 data type, it is the value that will be converted to Interval Day to Second.
- nls_paramter is a decimal character and group separator value.
Examples:
SELECT TO_DSINTERVAL('50 10:30:00') FROM dual;
Would return ‘+50 10:30:00.000000’