CMIS quiery with timestamp question
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2012 04:57 AM
Hi!
i need to get last modified documents in alfresco repository using web request
i ve read that document http://wiki.alfresco.com/wiki/CMIS_Query_Language and try to execute query:
http://localhost:8080/alfresco/service/cmis/query?q=SELECT * FROM cmis:document WHERE cmis:lastModificationDate > TIMESTAMP'2009-04-01T12:15:00.000Z'
and have got an !empty responce
i need to get last modified documents in alfresco repository using web request
i ve read that document http://wiki.alfresco.com/wiki/CMIS_Query_Language and try to execute query:
http://localhost:8080/alfresco/service/cmis/query?q=SELECT * FROM cmis:document WHERE cmis:lastModificationDate > TIMESTAMP'2009-04-01T12:15:00.000Z'
and have got an !empty responce
<?xml version="1.0" encoding="UTF-8"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns:cmisra="http://docs.oasis-open.org/ns/cmis/restatom/200908/" xmlns:cmis="http://docs.oasis-open.org/ns/cmis/core/200908/" xmlns:alf="http://www.alfresco.org" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"><author><name>hunter</name></author><generator version="4.0.0 (b 3835)">Alfresco (Community)</generator><icon>http://localhost:8080/alfresco/images/logo/AlfrescoLogo16.ico</icon><id>http://www.alfresco.org/rss/atom/urn:uuid:resultset</id><link rel="service" href="http://localhost:8080/alfresco/service/cmis'/><link rel="self" href="http://localhost:8080/alfresco/service/cmis/query?q=SELECT%20*%20FROM%20cmis:document%20WHERE%20cmis...><title>Result set for SELECT * FROM cmis:document WHERE cmis:lastModificationDate > TIMESTAMP'2010-04-01T12:15:00.000Z'</title><updated>2012-01-08T11:52:53.294+02:00</updated><opensearch:totalResults>0</opensearch:totalResults><opensearch:startIndex>0</opensearch:startIndex><opensearch:itemsPerPage>-1</opensearch:itemsPerPage><cmisra:numItems>0</cmisra:numItems></feed>
Pleace help me to get working "last modified documents" query
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2012 02:23 AM
that request return all documents
http://localhost:8080/share/page/feed/components/documentlibrary/feed/all/site/mysite/documentlibrar...
but is it possible to limit documents by last modified date?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-10-2012 04:53 AM
This might be because of date format you are using.
Try with other date format
i.e SELECT * FROM cmis:document WHERE cmis:creationDate < TIMESTAMP '2010-04-01T00:00:00.000+00:00'
Also I think if that does not work you can limit the result by IN clause as follow.
SELECT * FROM cmis:document WHERE cmis:creationDate IN ( TIMESTAMP '2010-03-31T12:52:12.123Z' )
Try with other date format
i.e SELECT * FROM cmis:document WHERE cmis:creationDate < TIMESTAMP '2010-04-01T00:00:00.000+00:00'
Also I think if that does not work you can limit the result by IN clause as follow.
SELECT * FROM cmis:document WHERE cmis:creationDate IN ( TIMESTAMP '2010-03-31T12:52:12.123Z' )
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-20-2012 06:09 PM
r_hunter, you might want to look at this thread:
https://forums.alfresco.com/en/viewtopic.php?f=45&t=43067
Jeff
https://forums.alfresco.com/en/viewtopic.php?f=45&t=43067
Jeff
