Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 26111 invoked from network); 30 Jun 2008 16:12:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Jun 2008 16:12:16 -0000 Received: (qmail 75158 invoked by uid 500); 30 Jun 2008 16:12:16 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 75141 invoked by uid 500); 30 Jun 2008 16:12:16 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 75130 invoked by uid 99); 30 Jun 2008 16:12:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jun 2008 09:12:16 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbbellet@goojet.com designates 84.14.163.131 as permitted sender) Received: from [84.14.163.131] (HELO trinity.anyware-tech.com) (84.14.163.131) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jun 2008 16:11:24 +0000 Received: from localhost (localhost [127.0.0.1]) by trinity.anyware-tech.com (Postfix) with ESMTP id 84272400DA4 for ; Mon, 30 Jun 2008 18:11:13 +0200 (CEST) Received: from trinity.anyware-tech.com ([127.0.0.1]) by localhost (trinity.anyware-tech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 18245-04 for ; Mon, 30 Jun 2008 18:11:08 +0200 (CEST) Received: from [10.0.0.198] (122.57-14-84.ripe.coltfrance.com [84.14.57.122]) by trinity.anyware-tech.com (Postfix) with ESMTP id 19832400D9C for ; Mon, 30 Jun 2008 18:11:08 +0200 (CEST) Message-ID: <4869059C.4080305@goojet.com> Date: Mon, 30 Jun 2008 18:11:08 +0200 From: Jean-Baptiste Bellet User-Agent: Thunderbird 2.0.0.14 (X11/20080505) MIME-Version: 1.0 To: users@jackrabbit.apache.org Subject: Birthdate query Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Debian amavisd-new at anyware-tech.com X-Virus-Checked: Checked by ClamAV on apache.org Hi, I'm using jackrabbit and I'm trying to execute a query in order to retrieve 'users', registered in JCR, who have a birthdate corresponding to the current date. For example if a user was born on june the 30th, 1992 I want to compare the user's birthdate with june the 30th (and without the year wich is not important in this case). I have tried a lot of queries, but without success. Any idea on how to perform such a query? Thanks a lot, jb This one works: //user[@birthDate = '1992-06-30T14:36:24.292+01:00'] These do not work: //user[substring(@birthDate, 1, 1) = '1'] //user[substring(fn:string(@birthDate), 1, 1) = '1'] //user[concat(substring(@birthDate, 6, 2), substring(@birthDate, 9, 2)) = '0630'] //user[fn:month-from-dateTime(@birthDate) = 6] //user[fn:month-from-dateTime(./@birthDate/value()) = 6]