<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/fn.currentDateTime.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>fn.currentDateTime</api:function-name><api:suggest>fn.currentdatetime</api:suggest><api:suggest>fn</api:suggest><api:suggest>currentdatetime</api:suggest><api:function-link mode="xquery" fullname="fn:current-dateTime">/apidoc/8.0/fn:current-dateTime.xml</api:function-link><api:function mode="javascript" name="currentDateTime" type="builtin" lib="fn" category="ContextBuiltins" bucket="W3C-Standard Functions" hidden="false" prefix="fn" namespace="http://www.w3.org/2005/xpath-functions" fullname="fn.currentDateTime"><api:summary>
  Returns the current dateTime value (with timezone) from the dynamic context.
  (See
<a href="http://www.w3.org/TR/xpath20/#id-xp-evaluation-context-components" xmlns="http://www.w3.org/1999/xhtml">Section C.2 Dynamic
Context Components[XP]</a>.) This is an
  <code xmlns="http://www.w3.org/1999/xhtml">xs:dateTime</code> that is current at some time during the
  evaluation of a query or transformation in which
  <code xmlns="http://www.w3.org/1999/xhtml">fn:current-dateTime()</code> is executed. This function is
  *stable*. The precise instant during the query or transformation
  represented by the value of <code xmlns="http://www.w3.org/1999/xhtml">fn:current-dateTime()</code> is
  *implementation dependent*.
</api:summary><api:params/><api:return>Date</api:return><api:usage>
  <code xmlns="http://www.w3.org/1999/xhtml">fn:current-dateTime()</code> returns an <code xmlns="http://www.w3.org/1999/xhtml">xs:dateTime</code>
  corresponding to the current date and time. For example, an invocation
  of <code xmlns="http://www.w3.org/1999/xhtml">fn:current-dateTime()</code> might return
  <code xmlns="http://www.w3.org/1999/xhtml">2004-05-12T18:17:15.125Z</code> corresponding to the current
  time on May 12, 2004 in timezone Z.
</api:usage><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
fn.currentDateTime()

=&gt; 2014-10-29T21:13:49.437147
</pre></api:example></api:function></api:function-page>