morja
morja

Reputation: 8550

Alfresco CMIS query with dynamic date

I want to query Alfresco through the CMIS query interface. I can not find any documentation on how to query with a condition on a dynamic date, e.g. today.

I want to retrieve changes within the last 24 hours. So what I am looking for is an equivalent to the SQL NOW.

E.g.

SELECT * FROM cmis:document WHERE cmis:lastModificationDate >= NOW() - 1 DAY

Is this possible?

Upvotes: 2

Views: 3636

Answers (1)

skuro
skuro

Reputation: 13514

AFAICS there's nothing in the spec about such a feature. You need to calculate dynamic datetime values as part of the logic that builds the query, then translate it into a literal:

SELECT * FROM cmis:document WHERE cmis:lastModificationDate < TIMESTAMP '2010-04-01T00:00:00.000+00:00'

Upvotes: 4

Related Questions