TO_DSINTERVAL

Purpose

This function converts a string value into an interval (INTERVAL DAY TO SECOND).

Syntax

to_dsinterval::=

Usage Notes

  • The string has always format [+|-]DD HH:MI:SS[.FF]. Valid values are 0-999999999 for days (DD), 0-23 for hours (HH), 0-59 for minutes (MI) and 0-59.999 for seconds (SS[.FF]).
  • The fractional seconds are cut at the third position although you can specify more than three.

  • For additional information, refer to TO_YMINTERVAL, NUMTODSINTERVAL and NUMTOYMINTERVAL.

Example

SELECT TO_DSINTERVAL('3 10:59:59.123') TO_DSINTERVAL;