Name

seconds-from-dateTime( ) — converts an XML Schema xs:dateTime into a number of seconds

Synopsis

Defined in: XForms 1.0
Parameters: string dateTime (required)
Return type: number

This function computes a signed fractional number of seconds relative to an epoch of 1970-01-01T00:00:00Z, and is useful when two xs:dateTimes need to be compared.

This example returns the large number of seconds representing the current date and time:

seconds-from-dateTime(now())

Get XForms Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.