Return-Path: Delivered-To: apmail-jackrabbit-users-archive@minotaur.apache.org Received: (qmail 32398 invoked from network); 16 Jul 2010 12:29:01 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 16 Jul 2010 12:29:01 -0000 Received: (qmail 76814 invoked by uid 500); 16 Jul 2010 12:29:00 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 76568 invoked by uid 500); 16 Jul 2010 12:28:58 -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 76559 invoked by uid 99); 16 Jul 2010 12:28:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 16 Jul 2010 12:28:57 +0000 X-ASF-Spam-Status: No, hits=-1.6 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [64.18.2.28] (HELO exprod7og125.obsmtp.com) (64.18.2.28) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 16 Jul 2010 12:28:50 +0000 Received: from source ([209.85.161.47]) by exprod7ob125.postini.com ([64.18.6.12]) with SMTP ID DSNKTEBP4D5NLgwibAlfE/K65S1P+JVJ79Nn@postini.com; Fri, 16 Jul 2010 05:28:29 PDT Received: by fxm12 with SMTP id 12so1022158fxm.6 for ; Fri, 16 Jul 2010 05:26:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.104.139 with SMTP id p11mr600618fao.106.1279283167106; Fri, 16 Jul 2010 05:26:07 -0700 (PDT) Received: by 10.223.126.77 with HTTP; Fri, 16 Jul 2010 05:26:07 -0700 (PDT) In-Reply-To: References: Date: Fri, 16 Jul 2010 14:26:07 +0200 Message-ID: Subject: Re: xpath query problem From: Ard Schrijvers To: users@jackrabbit.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hello Ahmed, you can also use it like it is used in jackrabbit: Calendar value =3D ... ; "xs:dateTime('"+org.apache.jackrabbit.value.ValueFactoryImpl.getInstance().= createValue(value).getString() + "')"; Regards Ard On Fri, Jul 16, 2010 at 2:17 PM, Ahmed Elshereay wrote= : > Hi, > > I found how to get an XML date format in java, here's the way: > > GregorianCalendar cal =3D new GregorianCalendar(2010, Calendar.JULY, 15, = 15, > 29, 17); > XMLGregorianCalendar xmlCal =3D DatatypeFactory.newInstance > ().newXMLGregorianCalendar(cal); > > Then... > > xs:dateTime('" + xmlCal.toXMLFormat() + "') > > =A0Thank you Alex.