Extracts the number of seconds from the seconds component of $dayTimeDuration-var.
If the value of $dayTimeDuration-var is the empty sequence, the empty sequence is returned. The empty sequence is a sequence containing zero items (), which is similar to null in SQL.
xf:get-seconds-from-dayTimeDuration(xf:dayTimeDuration? $dayTimeDuration-var) —> xs:decimal?
Contains a representation of a time duration which can contain days, hours, minutes, and seconds. |
Returns the number as seconds as an decimal from seconds component of $dayTimeDuration-var.
<seconds>{xf:get-seconds-from-dayTimeDuration(xf:dayTimeDuration("P7DT9H12M14S"))}</seconds>
The preceding query generates the following result:
<seconds>14</seconds>
<seconds>{xf:get-seconds-from-dayTimeDuration(xf:dayTimeDuration("-PT7S"))}</seconds>
The preceding query generates the following result:
<seconds>-7</seconds>
<seconds>{xf:get-seconds-from-dayTimeDuration(xf:dayTimeDuration("P2DT6M"))}</seconds>
The preceding query generates the following result:
<seconds>0</seconds>
W3C get-seconds-from-dayTimeDuration function description.
W3C dayTimeDuration data type description.