Loading TOC...

MarkLogic Server 11.0 Product Documentation
cpf.documentSetLastUpdated

cpf.documentSetLastUpdated(
   doc as String,
   last-updated as Date
) as null

Summary

Set the date and time of the document's last update.

Parameters
doc The URI of the document.
last-updated The date and time at which the document was last updated, typically fn:current-dateTime().

Usage Notes

In general, applications should only set the update time of a document in the document update action and should set it to the current date and time to ensure consistency of processing.

Example

const cpf = require('/MarkLogic/cpf/cpf');

declareUpdate();
cpf.documentSetLastUpdated('/myDocs/example.xml', 
                   fn.currentDateTime());
   

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.