I'm having a hard time finding out to compare dates using the SQL2 query language.
I want to be able to do stuff like this:
SELECT p.* FROM [nt:base] AS p WHERE EXTRACT(YEAR FROM p.[some_date]) = "2008"
Is it possible? What are the best techniques for these king of constraints?
maybe you'd like to do something like
FROM cq:PageContent AS s
WHERE s.[jcr:created] >= CAST('2012-01-01T00:00:00.000Z' AS DATE)
AND s.[jcr:created] < CAST('2013-01-01T00:00:00.000Z' AS DATE)
I'm not aware of any EXTRACT function in JCR queries