TO_DSINTERVAL converts a character string of CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype to an INTERVAL DAY TO SECOND type.
TO_DSINTERVAL accepts argument in one of the two formats:
SQL interval format compatible with the SQL standard (ISO/IEC 9075:2003)
ISO duration format compatible with the ISO 8601:2004 standard
In the SQL format, days is an integer between 0 and 999999999, hours is an integer between 0 and 23, and minutes and seconds are integers between 0 and 59. frac_secs is the fractional part of seconds between .0 and .999999999. One or more blanks separate days from hours. Additional blanks are allowed between format elements.
In the ISO format, days, hours, minutes and seconds are integers between 0 and 999999999. frac_secs is the fractional part of seconds between .0 and .999999999. No blanks are allowed in the value.
The syntax for the to_dsinterval function is:
to_dsinterval( character [ nls_parameter ] )
character is the value to convert to an INTERVAL DAY TO SECOND type. It can be a char, varchar2, nchar, or nvarchar2 value.
nls_parameter is a decimal character and group separator value.
Applies To:
· Oracle 9i, Oracle 10g, Oracle 11g
For example:
to_dsinterval('150 08:30:00') | would return '+000000150' |
to_dsinterval('80 12:30:00') | would return '+000000080' |
to_dsinterval('95 18:30:00') | would return '+000000095' |

