seconds-from-dateTime function
The fn:seconds-from-dateTime function returns the seconds component of an xs:dateTime value.
Syntax
- dateTime-value
- The dateTime value from which the seconds component is to be extracted.
dateTime-value is of type xs:dateTime, or is an empty sequence.
Returned value
If dateTime-value is of type xs:dateTime, the returned value is of type xs:decimal, and the value is greater than or equal to 0 and less than 60. The value is the seconds and fractional seconds component of dateTime-value.
If dateTime-value is an empty sequence, the returned value is an empty sequence.
Examples
The following function returns the seconds component of dateTime value for February 8, 2005 at 2:16:23 pm in theUTC-8 time zone.
fn:seconds-from-dateTime(xs:dateTime("2005-02-08T14:16:23-08:00"))The returned value is 23.
The following function returns the seconds component of dateTime value for June 23, 2005 at 9:16:20.43 am in the UTC time zone.
fn:seconds-from-dateTime(xs:dateTime("2005-06-23T09:16:23.43Z"))The returned value is 20.43.
