fn:current-dateTime function

The fn:current-dateTime function returns the current date and time in the local time zone.

Syntax

Read syntax diagramSkip visual syntax diagramfn:current-dateTime()

Returned value

The returned value is an xs:dateTime value that is the current date and time. The time zone component of the returned value is the local time zone. The maximum precision for fractions of seconds is 12.

Example

The following function returns the current date and time.
fn:current-dateTime()

If this function were invoked on December 2, 2009 at 6:25 in Toronto (time zone -PT5H), the returned value would be 2009-12-02T06:25:30.3847249023-05:00.