xf:get-seconds-from-time

Extracts the seconds from $time-var.

If the value of $time-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.

Signatures

xf:get-seconds-from-time(xs:time? $time-var) —> xs:decimal?

Arguments

Data Type
Argument
Description

xs:time?

$time-var

Contains a representation of time.

Returns

Returns the seconds as an decimal from $time-var.

Examples

Simple

The following is a simple example using the get-seconds-from-time function:

<seconds>{xf:get-seconds-from-time("22:21:01")}</seconds> 

The preceding query generates the following result:

<seconds>1</seconds> 

Timezone

The following example uses the get-seconds-from-time function with a timezone:

<seconds>{xf:get-seconds-from-time("14:21:01-05:00")}</seconds> 

The preceding query generates the following result:

<seconds>1</seconds> 

Related Topics

W3C get-seconds-from-time function description.

W3C time data type description.