[MarkLogic Dev General] Timestamp of the document when it wasloaded

Isha Chadha i.chadha at mpstechnologies.com
Thu Jul 3 20:48:57 PDT 2008


Thanks... It works.



Isha Chadha

Senior Software Engineer  
MPS Technologies (A Macmillan company)

 

 


-----Original Message-----
From: general-bounces at developer.marklogic.com
[mailto:general-bounces at developer.marklogic.com] On Behalf Of David Sewell
Sent: Thursday, July 03, 2008 7:06 PM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] Timestamp of the document when it
wasloaded

You can have the server maintain a "last modified" timestamp via the
Admin console: under Databases, select the database, then the Configure
tab, then set "maintain last modified" to TRUE. After that, calling
xdmp:document-get-properties($fileURI, xs:QName("prop:last-modified"))
will return the last-modified date. The server handles this
automatically.

However, that timestamp changes every time you modify the file. So if
you wanted a permanent timestamp showing the first load time, so far as
I know you would have to use xdmp:document-add-properties() as a
separate step to create a special property containing the timestamp at
loading. You could do this as part of a custom load script.

DS

On Thu, 3 Jul 2008, Isha Chadha wrote:

>
>
> Hi,
>
>
>
> Would really appreciate an answer to this...
>
> How to get the timestamp of the document when it was first loaded in the
> database.
>
>
>
> Thanks,
>
> Isha Chadha
>
>
>
>
>
>

-- 
David Sewell, Editorial and Technical Manager
ROTUNDA, The University of Virginia Press
PO Box 801079, Charlottesville, VA 22904-4318 USA
Courier: 310 Old Ivy Way, Suite 302, Charlottesville VA 22903
Email: dsewell at virginia.edu   Tel: +1 434 924 9973
Web: http://rotunda.upress.virginia.edu/
_______________________________________________
General mailing list
General at developer.marklogic.com
http://xqzone.com/mailman/listinfo/general




More information about the General mailing list