2

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?

skuro
  • 13,414
  • 1
  • 48
  • 67
morja
  • 8,297
  • 2
  • 39
  • 59

1 Answers1

4

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'
skuro
  • 13,414
  • 1
  • 48
  • 67