Return seconds integer value from datetime argument.
The following construct(s) refer to this construct:
fn:seconds-from-dateTime(xs:dateTime? $arg) => xs:integer?
This function returns an integer value between 0 and 60.999, representing the seconds component of the localized value of the argument value. The localized value is the value in its original timezone or without timezone. If the argument is an empty sequence, the empty sequence is returned.
Please note that the value can be beyond 60 in order to account for leap seconds.
$arg |
argument value of type |
---|
This function call returns the seconds component of the current date and time:
seconds-from-dateTime(current-dateTime())
This function call returns the seconds component of the specified datetime value which is 0:
seconds-from-dateTime(xs:dateTime("1999-12-31T21:20:00-05:00")