Hello,
The following query counts documents by publication date.
{{velocity}}
## Count all publication dates
#set($results=$services.query.xwql("select guide.DocumentDate,
count(guide.DocumentDate) from Document doc, doc.object(BIMGuides.GuideClass) as guide
group by guide.DocumentDate order by guide.DocumentDate").execute())
PublicationDate,Count
#foreach($result in $results)
#set($resDate = $result.get(0))
#set($resString = $resDate.toString().substring(0, 10))
$resString,$result.get(1)
#end
{{/velocity}}
I would like to regroup publication dates by year (getting « 2014,3 » when 2 documents are
published in Jan2014 and 1 in Oct2014) instead of getting all single dates.
Any idea ?
Thank you in advance!
Sylvain