Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

can we write a query for getting lastmodified date of pages at particular location say /content/abc/xyz

Avatar

Avatar
Boost 1
Level 1
kritir46532399
Level 1

Like

1 like

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
kritir46532399
Level 1

Like

1 like

Total Posts

5 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
kritir46532399
Level 1

04-02-2020

its fairly simple to get the pages under a particular location but i want to get those pages last modified date as well via AEM query.Any idea for the same ??

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 5
Employee
sunjot16
Employee

Likes

104 likes

Total Posts

164 posts

Correct Reply

50 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 25
Give Back 10
Give Back
View profile

Avatar
Give Back 5
Employee
sunjot16
Employee

Likes

104 likes

Total Posts

164 posts

Correct Reply

50 solutions
Top badges earned
Give Back 5
Give Back 3
Give Back 25
Give Back 10
Give Back
View profile
sunjot16
Employee

05-02-2020

Yes, you can do that.

 

You can make changes to the following query, as per your use case:

 

/jcr:root/content//element(*,cq:Page)[(@cq:lastModified >= xs:dateTime('2015-11-03T04:00:00.000-05:00') and @cQ:lastModified <= xs:dateTime('2015-11-03T20:00:00.000-05:00')) or (@jcr:created >= xs:dateTime('2019-01-01T04:00:00.000-05:00')
and @jcr:created <= xs:dateTime('2020-11-03T20:00:00.000-05:00'))]

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 1
ashish_mishra1
Level 1

Like

1 like

Total Posts

19 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
ashish_mishra1
Level 1

Like

1 like

Total Posts

19 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Boost 1
Affirm 1
View profile
ashish_mishra1
Level 1

05-02-2020

You can Iterate over search results and then adapt the hits to a page and from there get the last modified date of pages. This you can do in Java as well as using groovy script.