On Wed, Feb 25, 2009 at 2:59 PM, Kurz Wolfgang <[email protected]> wrote: > I always get a full result-set when I use <= xs:dateTime or < and I always > get a empty resultset when ever is use >= or > > > Somehow it doesn't matter at all what the value I compare to is. > > This is the query I am using: > /jcr:root/*/*/*[(@artikelDokument = 'false') and (@freigegeben = 'true') and > (@aktiv = 'true') and (@wiedervorlageAsDate <= > xs:dateTime('2008-02-25T14:18:26.516+01:00'))and (@tempContent = > 'false')]/*//element(*, nt:unstructured) [(@menuid = '1067') and ( > @ocm_classname='de.gwvs.tos.commons.jackrabbit.domain.JCRMenuId')] > > Anyone have an idea on what I am doing wrong?
No idea yet. Did you check the field is actually stored as DATE property? What values are stored in those dates (it could be that they actually are all before the date given in your query....)? When you mention "<=", "<", ">=" and ">", do you mean you always used the xs:dateTime() function for the comparison? You have to use that function for comparing to dates and it must always include the full ISO8601 string (date + "T" + time + "Z"/offset), but your query above looks good in this respect. Reards, Alex -- Alexander Klimetschek [email protected]
