MarkLogic 9 Product Documentation
fn.currentDateTime

fn.currentDateTime() as xs.dateTime

Summary

Returns the current dateTime value (with timezone) from the dynamic context. (See Section C.2 Dynamic Context Components[XP].) This is an xs:dateTime that is current at some time during the evaluation of a query or transformation in which fn:current-dateTime() is executed. This function is *stable*. The precise instant during the query or transformation represented by the value of fn:current-dateTime() is *implementation dependent*.

Usage Notes

fn:current-dateTime() returns an xs:dateTime corresponding to the current date and time. For example, an invocation of fn:current-dateTime() might return 2004-05-12T18:17:15.125Z corresponding to the current time on May 12, 2004 in timezone Z.

Example

fn.currentDateTime()

=> 2014-10-29T21:13:49.437147
Powered by MarkLogic Server | Terms of Use | Privacy Policy