xdmp.requestTimestamp() as String?
Returns the system timestamp for this request if the request is a query statement. Returns the empty sequence if the current request is an update statement.
xdmp:request-timestampfunction returns the system timestamp that is in effect for current query. This timestamp will remain unchanged for the duration of the query. If you want to get the most recent system timestamp external to the current running context during an update statement (for example, if your query takes a long time to run, and there are other updates occurring in your database while your update statement is running), you can use
xdmp:evalto evaluate a separate query statement that returns the system timestamp at the time the
xdmp:evalquery is evaluated.
xdmp.requestTimestamp(); => 1234567