Query using timestamp: last_modified

I know when I request a Tamino document in the HTTP-header the ‘last modified’ timestamp is given for free;-)

From the documentation:
"Each document in Tamino has associated with it an internal timestamp that represents the date and time when it was most recently modified."

Is it possible to use this internal timestamp as a selection criterium in queries?

If yes how, if no why not?



Yes you can select documents using the last modified date/time as a criteria. This can be accomplished using XQuery, for example:-

declare namespace tf = "http://namespaces.softwareag.com/tamino/TaminoFunction"
declare namespace xs = "http://www.w3.org/2001/XMLSchema"

for $q in input()/document
where tf:getLastModified(root($q)) >= xs:dateTime(“2003-09-11T14:00:10Z”)
return $q

Hope this helps.

Stuart Fyffe-Collins
Software AG (UK) Ltd.

Good to hear from you, Marcel!

In addition to what Stuart replied, a copy of a reply I gave somewhere else on this topic (just another example):

posted 08 January 04 12:36
Hi Brian,

I do not have a solution but a hint: use tf:containsText (see docu). It gives you the date and time of the last modification of any document.

In a query something like

declare namespace tf="http://namespaces.softwareag.com/tamino/TaminoFunction"
for $p …



sort by ( . descending)

(This query returned some data for me with newest first. Handy)

happy trying,