Loading TOC...

xdmp.documentTimestamp

xdmp.documentTimestamp(
   $uri as String
) as Number?

Summary

Returns timestamp of the most recent visible update to a document, lock, or property. Returns the empty sequence if no document, lock, or property exists.

Parameters
$uri The URI of the document, lock, or property.

Usage Notes

If the current request is part of a multi-statement transaction and the most recent visible update was in an earlier statement in the transaction, the timestamp for the update has not yet been established, so an empty sequence is returned.

Example

xdmp.documentTimestamp("example.xml");
=> 13384772182196660

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

Comments

The commenting feature on this page is enabled by a third party. Comments posted to this page are publicly visible.
  • If you want a javascript date then you can get one easily by doing: var timestamp = xdmp.documentTimestamp("example.xml") new Date(timestamp/10000)