AnsweredAssumed Answered

How to find nodes in XPATH created between certain duration?

Question asked by amit_wmw@yahoo.com on May 4, 2009
Hello,

How to query and find nodes using XPATH, created between certain duration of time? Say if I have to find nodes created between time duration (2009-04-30T12:41:13.691+05:30 and 2009-04-30T12:42:27.455+05:30), how to make query for it?

I have tired a lot by making diffrent combinations of queries(as below) but none worked :-(

——————————————————————————————————————-

Sample XPATH queries
—————————

1) Query query = queryManager.createQuery("//app:company_home//element(*, cm:content)"+" [@cm:created < '2009-04-22T12:07:19.864+05:30'and @cm:created > '2009-04-22T12:07:19.864+05:30']", Query.XPATH);

2) Query query = queryManager.createQuery("//app:company_home//element(*, cm:content)"+" [@cm:created > '2009-04-22T12:07:19.864+05:30']", Query.XPATH);

3) Query query = queryManager.createQuery("//app:company_home//element(*, cm:content)"+" [@cm:modified < @cm:created('2009-04-28T11:02:09.734+05:30')]", Query.XPATH);


4) Query query = queryManager.createQuery("//app:company_home//element(*, cm:content)"+" [@jcr:created < @cm:created('2009-04-28T11:02:09.734+05:30')]", Query.XPATH);

5) Query query = queryManager.createQuery("//app:company_home//element(*, cm:content)"+" [@jcr:created > '2009-04-22T12:07:19.864+05:30']", Query.XPATH);

etc……….



————————————————————————————————-

Please suggest.

Thanks
Amit.

Outcomes