Hello,
I’m trying to create a query that will list all children of xwiki:A.B, but only created from date1 to date2.
The query to display each separately works, but not combined:
#set($reference = $services.model.createDocumentReference(‘xwiki’, ‘A’, ‘B’))
#set($MyTopSpaceName = $xwiki.getDocument($reference))
#set($MyTopSpace=“‘${MyTopSpaceName}’”)
#foreach($item in $services.query.xwql(“select space.name from XWikiSpace as space where space.parent = $MyTopSpace and doc.creationDate > :date1 and doc.creationDate < :date2”).bindValue(“date1”, $datetool.toDate(‘yyyy-MM-dd’, ‘2023-01-01’)).bindValue(“date2”, $datetool.toDate(‘yyyy-MM-dd’, ‘2025-01-01’)).execute())
bla bla bla
I would welcome your assistance.
Thank you.
4 posts - 2 participants