sai Kumar
sai Kumar

Reputation: 43

Timestamp of a Document in Marklogic

I would like to know the current timestamp of a document I also need how to find the timestamp of same document when it is updated

is it possible?

Upvotes: 0

Views: 250

Answers (1)

SašaM
SašaM

Reputation: 416

Have you looked here, sounds like what you need: https://docs.marklogic.com/xdmp:document-timestamp

xdmp:document-timestamp(
   $uri as xs:string
) as xs:integer?

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.

$uri is the URI of the document, lock, or property.

Example:

xdmp:document-timestamp("example.xml")
=> 13384772182196660

Upvotes: 5

Related Questions