<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/temporal.statementSetSystemTime.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>temporal.statementSetSystemTime</api:function-name><api:suggest>temporal.statementsetsystemtime</api:suggest><api:suggest>temporal</api:suggest><api:suggest>statementsetsystemtime</api:suggest><api:function-link mode="xquery" fullname="temporal:statement-set-system-time">/apidoc/8.0/temporal:statement-set-system-time.xml</api:function-link><api:function mode="javascript" name="statementSetSystemTime" lib="temporal" category="Temporal" hidden="false" bucket="MarkLogic Built-In Functions" prefix="temporal" namespace="http://marklogic.com/xdmp/temporal" fullname="temporal.statementSetSystemTime"><api:summary>
  This function sets the system start time on temporal
  documents that are inserted or deleted
  in the same statement as this function.  If this function is not called along
  with a temporal document insert or delete, nothing will be affected.
  </api:summary><api:params><api:param name="system-time" type="xs:dateTime"><api:param-description>
    The dateTime to set.
    </api:param-description><api:param-name>system-time</api:param-name><api:param-type>Date</api:param-type></api:param></api:params><api:return>null</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
declareUpdate();
var temporal = require("/MarkLogic/temporal.xqy");

var root = xdmp.unquote(
  '&lt;tempdoc&gt;\n\
    &lt;systemStart&gt;2001-01-01T00:00:00Z&lt;/systemStart&gt;\n\
    &lt;systemEnd&gt;2001-01-01T00:00:00Z&lt;/systemEnd&gt;\n\
    &lt;validStart&gt;2014-06-03T14:13:05.472585-07:00&lt;/validStart&gt;\n\
    &lt;validEnd&gt;9999-12-31T23:59:59.99Z&lt;/validEnd&gt;\n\
    &lt;content&gt;v1-content here&lt;/content&gt;\n\
  &lt;/tempdoc&gt;').next().value.root;
temporal.documentInsert( "temporalCollection", "doc.xml", root, 
       null, null, null, null );
temporal.statementSetSystemTime(
    xs.dateTime("1990-01-01T00:00:00.00-00:00"));
</pre></api:example></api:function></api:function-page>