XPath/XQuery multiply-dayTimeDuration function


Returns the result of multiplying a xs:dayTimeDuration by a number.

Operator Mapping

Defines the semantics of the "*" operator when applied to an xs:dayTimeDuration and a numeric value.


$arg1 as xs:dayTimeDuration,
$arg2 as xs:double
) as xs:dayTimeDuration


The function returns the result of multiplying the value of $arg1 by $arg2. The result is the xs:dayTimeDuration whose length in seconds is equal to the length in seconds of $arg1 multiplied by the numeric value $arg2.

If $arg2 is positive or negative zero, the result is a zero-length duration. If $arg2 is positive or negative infinity, the result overflows and is handled as described in .

For handling of overflow and underflow, see .


The expression op:multiply-dayTimeDuration(xs:dayTimeDuration("PT2H10M"), 2.1) returns xs:dayTimeDuration('PT4H33M').

Error Conditions

A dynamic error is raised if $arg2 is NaN.


Either operand (and therefore the result) may be negative.