I am trying to fetch data from Content node based on some filter criteria and below are my first try
Query Builder :
path="path of content"
1_property = Function
SELECT * FROM [nt:unstructured] as ref WHERE ISDESCENDANTNODE(ref,['path']) AND ref.Function='Legal' AND ref.date >= CAST('2012-04-01T00:00:00.000+02:00' AS DATE) ORDER BY ref.date DESC
I want the data in sort order based on date Property available in node that is String type.
Actual data return by Query is :
jobad33180_1 : 4-9-2017
jobad35943_1 : 23-10-2017
jobad36125_1 : 27-10-2017
jobad36127_1 : 27-10-2017
Expected Data :
To order by date - see this community thread -- Magnolia JCR-SQL2 order by Date - Stack Overflow
Do you mean last modified date?
If so then:
Please refer to this wonderful community article:
Link:- Query Builder | CQ5 AEM Tricks of Trade
In my case,
are working fine.
Reference post:- Querybuilder.json: Orderby works only for some properties
If you want something related to date range then see Digest the Query Builder API | CQ5 AEM Tricks of Trade
Date is property that is available in content and its type is String and i want to create a query which give me response of all node based on date asc/desc format .
Date is property available in node its type is "String " we can't modified the property type String to date as it is production data.Please suggest to get all node details in date format asc/desc order.